【单选题】从user表的name字段中找出名字包含“王大伟”的人,下面哪条select语句是正确的?
A. Select * from user where 姓名 =’_王大伟_’ B. Select * from user where 姓名 =’%王大伟_’ C. Select * from user where 姓名 like ‘_王大伟%’ D. Select * from user where 姓名 like‘%王大伟%’
A. Select * from user where 姓名 =’_王大伟_’ B. Select * from user where 姓名 =’%王大伟_’ C. Select * from user where 姓名 like ‘_王大伟%’ D. Select * from user where 姓名 like‘%王大伟%’
举一反三
- 【多选题】下面语句可以实现查询user表中“zhangsan”的user,password,logins信息的是 A. select logins,user,password from user where name like ’%zhangsan%’; B. select user,password,logins, from user where name like ’zhangsan’; C. select password,logins,user from user where name=’zhangsan’ limit 1; D. select user,password,logins from user where name=’zhangsan’;
- 查询姓‘王’的学生信息应该用( ) A: SELECT * FROM 学生 WHERE 姓名 LIKE ’王_’ B: SELECT * FROM学生WHERE姓名= ’王%’ C: SELECT * FROM学生WHERE left(姓名,1)like ‘王’ D: SELECT * FROM学生WHERE left(姓名,1)= ‘王’
- “员工” 表的“姓名”字段中找出名字包含“玛丽”的人,下面哪条select语句正确:() A: Select * from员工 where 姓名 =’_玛丽_’ B: Select * from员工 where 姓名 =’%玛丽_’ C: Select * from员工 where 姓名 like‘_玛丽%’ D: Select * from员工 where 姓名 like‘%玛丽%’
- 下列哪些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 ’%张三%’
- 从“员工”表的“姓名”字段中找出名字包含“玛丽”的人,下面哪条select语句正确()。 A: Select * from 员工 where 姓名 =’_玛丽_’ B: Select * from 员工 where 姓名 =’%玛丽_’ C: Select * from 员工 where 姓名 like ‘_玛丽%’ D: Select * from 员工 where 姓名 like ‘%玛丽%&rsquo