检索所有姓“张”、姓“田”的学生信息,可以使用的SQL语句有()。
A: SELECT
* FROM student WHERE student_name LIKE('张%'
OR '田%';
B: SELECT
* FROM student WHERE SUBSTRING(student_name,1,1) in('张','田');
C: SELECT
* FROM student WHERE SUBSTRING(student_name,1,1)= '张'
OR SUBSTRING(student_name,1,1)='田';
D: SELECT
* FROM student WHERE student_name LIKE '张%'
OR student_name LIKE '田%';
A: SELECT
* FROM student WHERE student_name LIKE('张%'
OR '田%';
B: SELECT
* FROM student WHERE SUBSTRING(student_name,1,1) in('张','田');
C: SELECT
* FROM student WHERE SUBSTRING(student_name,1,1)= '张'
OR SUBSTRING(student_name,1,1)='田';
D: SELECT
* FROM student WHERE student_name LIKE '张%'
OR student_name LIKE '田%';
举一反三
- 检索所有姓“张”、姓“田”的学生信息,可以使用的SQL语句有______。 A: SELECT * FROM student WHERE student_name LIKE( '张%' OR '田%'); B: SELECT * FROM student WHERE SUBSTRING(student_name,1,1) in ('张','田'); C: SELECT * FROM student WHERE SUBSTRING(student_name,1,1)= '张' OR SUBSTRING(student_name,1,1)='田'; D: SELECT * FROM student WHERE student_name LIKE '张%' OR student_name LIKE '田%';
- 检索所有姓“周”,或者姓“陈”的学生信息,可以使用的SQL语句有______。 A: SELECT * FROM studentWHERE student_name LIKE( '陈%' OR '周%'); B: SELECT * FROM student WHERE SUBSTRING(student_name,1,1) in ('陈','周'); C: SELECT * FROM student WHERE SUBSTRING(student_name,1,1)= '周' OR SUBSTRING(student_name,1,1)='陈'; D: SELECT * FROM student WHERE student_name LIKE '陈%' OR student_name LIKE '周%';
- 查询姓"张"的学生姓名,下列()语句不能实现。 A: SELECT sname FROM student WHERE left(sname,1)= '张' B: SELECT snameFROM student WHERE sname LIKE '张%' C: SELECT sname FROM student WHERE substring(sname,1,1)= '张' D: SELECT sname FROM student WHERE sname='张%'
- 已知 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;