• 2022-06-06
    检索所有姓“周”,或者姓“陈”的学生信息,可以使用的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 '周%';
  • B,C,D

    举一反三

    内容

    • 0

      已知 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’;

    • 1

      查询姓"张"的学生姓名,下列()语句不能实现。 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='张%'

    • 2

      下面查询语句中哪条查询语句会查询出所有包含"李"的数据? 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‘%李%’

    • 3

      若想查询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;

    • 4

      查询姓“李”的学生的所有信息 A: select * from student where sname like ‘#李%’ B: select * from student where sname like ‘%李#’ C: select * from student where sname like “%李%” D: select * from student where sname like ‘%李%