PTA query for student information whose name is two words Score 3

This topic requires writing SQL statements,

Retrieve the student information whose name is two characters in the students table.

Tip: Please use the SELECT statement to answer.

Table Structure:

Please write the SQL statement that defines the table structure here. For example:

CREATE TABLE students (
 sno char(7) ,
  sname char(8) NOT NULL,
  class char(10),
  ssex char(2),
  bday date ,
  bplace char(10) ,
  IDNum char(18) ,
  sdept char(16),
  phone char(11),
  PRIMARY KEY (sno)
) ;

table sample

Please give a table sample corresponding to the above table structure here. For example

students table:

Sample output:

Please give a sample output here. For example:

Code length limit 16 KB

Time limit 400 ms

DatabaseMySQL

The result output requires a strict comparison of the order and data

select *
from students
where sname like "__"

Guess you like

Origin blog.csdn.net/weixin_70206677/article/details/129360188