已知 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’;
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 =’王__’;
- 若想查询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为空值的记录,则正确的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;
- 查询student表中id字段值小于5,并且gender字段值为“女”的学生姓名的SQL语句是() A: SELECT name FROM student WHERE id<;5 OR gender='女'; B: SELECT name FROM student WHERE id<;5 AND gender='女'; C: SELECT name FROM student WHERE id<;5 ,gender='女'; D: SELECT name FROM student WHERE id<;5 AND WHERE gender='女';
- student表中有姓名字段name,并且存在name为“sun%er”的记录。下面选项中,可以匹配“sun%er”字段值的SQL语句是