PTA finds the name, nationality, and contact number of all students with the surname "Li". score 3

Question stem:

Find the name, nationality and contact number of all students with the surname "Li".

Tip: Please use the SELECT statement to answer.

Table Structure:

The SQL statement defining the table structure is as follows:

CREATE TABLE student (

sno varchar(6) NOT NULL ,

sname varchar(10) ,

sex char(2) ,

nation char(2) ,

pnum char(18) ,

birth date ,

phone char(11) ,

dept varchar(20) ,

PRIMARY KEY (sno)

) ;

table sample

Table example corresponding to the above table structure:

student table:

Sample output:

Sample output:

Code length limit 16 KB

Time limit 400 ms

DatabaseMySQL

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

select sname, nation, phone
from student
where sname like "李%"

Guess you like

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