下面哪条语句可以查询姓“张”并且年龄等于20岁的用户,请问用哪条语句?
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
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 =’王__’;