A: Select * From table Where name like "%张%" And intAge=20
B: Select * From table Where name like "张%" And intAge=20
C: Select * From table Where name like "张%" And intAge="20"
D: Select * From table Where name="张" And intAge=20
举一反三
- 下面哪条语句可以查询姓“赵”并且年龄等于22岁的用户,请问用哪条语句?( ) A: Select * From tbAddress Where strName="赵" And intAge=22 B: Select * From tbAddress Where strName like "赵%" And intAge="22" C: Select * From tbAddress Where strName like "赵%" And intAge=22 D: Select * From tbAddress Where strName like "%赵%" And intAge=22
- 下面查询语句中哪条查询语句会查询出所有包含"李"的数据? 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‘%李%’
- 关于查询中列的别名, 以下()语句是不正确的(选一项) A: Select name as '姓名' from table B: Select name as姓名 from table where id =1 C: Sleect name = 姓名 from table D: Select names姓名 from table
- 下列哪些SQL语句可以查询出User表中name为张三的记录()。 A: SELECT * FROM User WHERE name = ’张三’ B: SELECT * FROM User WHERE name = ’张三’ LIMIT 0,1 C: SELECT * FROM User WHERE name LIKE ’张三’ D: SELECT * FROM User WHERE name LIKE ’%张三%’
- 已知 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 =’王__’;
内容
- 0
在学生表STUD中查询所有姓张的学生的信息,使用的SQL语句是______。 A: SELECT*FROM STUD WHERE 姓名 LIKE"张%” B: SELECT*FROM STUD WHERE 姓名 IN("张%") C: SELECT*FROM STUD WHERE 姓名 LIKE"张$" D: SELECT*FROM STUD WHERE 姓名 IN"张$)"
- 1
若想查询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;
- 2
已知 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’;
- 3
检索所有姓“张”、姓“田”的学生信息,可以使用的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 '田%';
- 4
查询姓"张"的学生姓名,下列()语句不能实现。 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='张%'