设ABC表的A列存储电话号码信息,查询不是以7开头的所有电话号码的查询语句是( )。
A: SELECT A FROM ABC WHERE A IS NOT ‘%7’
B: SELECT A FROM ABC WHERE A LIKE ‘%7%’
C: SELECT A FROM ABC WHERE A NOT LIKE ‘7%’
D: SELECT A FROM ABC WHERE A LIKE ‘[1-6]%’
A: SELECT A FROM ABC WHERE A IS NOT ‘%7’
B: SELECT A FROM ABC WHERE A LIKE ‘%7%’
C: SELECT A FROM ABC WHERE A NOT LIKE ‘7%’
D: SELECT A FROM ABC WHERE A LIKE ‘[1-6]%’
举一反三
- 从“员工”表的“姓名”字段中找出名字包含“abc”的人,下面哪条 select 语句是正确的? A: select * from 员工 where 姓名 =‘ _abc_’ B: select * from 员工 where 姓名 =’ %abc_’ C: select * from 员工 where 姓名 like ‘_abc%’ D: select * from 员工 where 姓名 like ‘%abc%’
- 下列语句()能够查询所有英语类课程的信息。 A: SELECT * FROM Course WHERE cname LIKE ‘%英语’ B: SELECT * FROM Course WHERE cname LIKE ‘%英语%’ C: SELECT * FROM Course WHERE cname LIKE ‘_英语_’ D: SELECT * FROM Course WHERE cname LIKE ‘*英语*’
- 通过查询身份证号,找到2000年出生的学生的信息,正确的语句是()。 A: SELECT * FROM 学生表 WHERE 身份证号 LIKE '______2000________ '; B: SELECT * FROM 学生表 WHERE 身份证号='______2000________ '; C: SELECT * FROM 学生表 WHERE 身份证号 LIKE '%2000%'; D: SELECT * FROM 学生表 WHERE substring(身份证号, 7, 4)=‘2000’;
- 查询姓“李”的学生的所有信息 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 ‘%李%
- 查询“图书”表中所有书名以“计算”开头的图书信息,正确的语句是__________。 A: SELECT * FROM 图书 WHERE 书名 LIKE "计算?" B: SELECT * FROM 图书 WHERE 书名 IN "计算*" C: SELECT * FROM 图书 WHERE 书名 = "计算?" D: SELECT * FROM 图书 WHERE 书名 LIKE "计算*"