查询姓王的学生信息,最准确的SQL语句是(
)。
A: SELECT
* FROM students WHERE s_name='王'
B: SELECT
* FROM students WHERE s_name='王%'
C: SELECT
* FROM students WHERE s_name LIKE '王'
D: SELECT
* FROM students WHERE s_name LIKE '王%'
)。
A: SELECT
* FROM students WHERE s_name='王'
B: SELECT
* FROM students WHERE s_name='王%'
C: SELECT
* FROM students WHERE s_name LIKE '王'
D: SELECT
* FROM students WHERE s_name LIKE '王%'
举一反三
- 查询学生的姓名、出生年月,最准确的SQL语句是(<br/>)。 A: SELECT<br/>* FROM students B: SELECT<br/>s_name,birthday FROM students C: SELECT<br/>s_name,birthday,phone FROM students D: SELECT<br/>s_name,birthday FROM students ORDER BY birthday
- 已知 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 =’王__’;
- 查询在2009年9月出生的学生,最准确的SQL语句是(<br/>)。 A: SELECT<br/>* FROM students WHERE birthday BETWEEN '2009-09-01' AND '2009-09-30' B: SELECT<br/>* FROM students WHERE birthday BETWEEN 2009-09-01 AND 2009-09-30 C: SELECT<br/>* FROM students WHERE birthday BETWEEN '2009-09-01' AND '2009-09-31' D: SELECT<br/>* FROM students WHERE birthday BETWEEN 2009-09-01 AND 2009-09-31
- 查询姓‘王’的学生信息应该用( ) A: SELECT * FROM 学生 WHERE 姓名 LIKE ’王_’ B: SELECT * FROM学生WHERE姓名= ’王%’ C: SELECT * FROM学生WHERE left(姓名,1)like ‘王’ D: SELECT * FROM学生WHERE left(姓名,1)= ‘王’
- 如果有学生表student,ssex代表学生性别,sname代表姓名,则想要得到所有姓张和姓王的女学生信息的SQL语句是() A: SELECT *<br/>FROM student<br/>WHERE ssex='女' OR sname ='张%' AND sname ='王%' B: SELECT *<br/>FROM student<br/>WHERE ssex='女' OR sname like '张%' AND sname like '王%' C: SELECT *<br/>FROM student<br/>WHERE ssex='女' AND (sname like '张%' OR sname like '王%') D: SELECT *<br/>FROM student<br/>WHERE (ssex='女' AND sname like '张%') OR sname like '王%'