若想查询student表中name为空值的记录,则正确的SQL语句是(1.0分)
A: select * from student where name = null;
B: select * from student where name link null;
C: select * from student where name = 'null';
D: select * from student where name is null;
A: select * from student where name = null;
B: select * from student where name link null;
C: select * from student where name = 'null';
D: select * from student where name is null;
举一反三
- 若想查询student表中name为空值的记录,则正确的SQL语句是( )。 A: SELECT * FROM student WHERE name = NULL; B: SELECT * FROM student WHERE name like NULL; C: SELECT * FROM student WHERE name = 'NULL'; D: SELECT * FROM student WHERE name is NULL;
- 已知 student 表有姓名字段 name ,并且存在 name 为’sun%er’的记录。下列选项中,以匹配“ sun%er ”字段值的 SQL 语句是 A: SELECT * FROM student WHERE name LIKE ‘sun%er’; B: SELECT * FROM student WHERE name LIKE ‘%%%’; C: SELECT * FROM student WHERE name LIKE '%\%%'; D: SELECT * FROM student WHERE name =‘sun%er’;
- 已知 student 表有姓名字段 name。若想查询所有姓“王”的学生,并且姓名由三个字符组成,则应使用的SQL 语句是 A: SELECT* FROM student WHERE name LIKE ‘王__’; B: SELECT* FROM student WHERE name LIKE ‘王%_’; C: SELECT* FROM student WHERE name LIKE ‘王%’; D: SELECT* FROM student WHERE name =’王__’;
- 下面查询语句中哪条查询语句会查询出所有包含"李"的数据? A: select * from student where name limit‘%李%’ B: select * from student where name =‘%李%’ C: select * from student where name like‘%李%’ D: select * from student where name in‘%李%’
- 查询student表中的所有非空email信息, 以下语句正确的是( ) A: Select email from student where email !=null B: Select email from student where email not is null C: Select email from student where email <> null D: Select email from student where email is not null