在SELECT语句中,与排序有关的关键字是______。
A: ORDER BY
B: LIMIT
C: DESC
D: ASC
E: : ACD
F: 、查询1997,1999年出生的同学信息,正确的SELECT语句是______。
G: SELECT * FROM student WHERE YEAR(birthday) NOT IN(1997,1999);
H: SELECT * FROM student WHERE YEAR(birthday)=1997 OR YEAR(birthday)=1999;
I: SELECT * FROM student WHERE YEAR(birthday) IN(1997,1999);
J: SELECT * FROM student WHERE YEAR(birthday) EXISTS(1997,1999);
A: ORDER BY
B: LIMIT
C: DESC
D: ASC
E: : ACD
F: 、查询1997,1999年出生的同学信息,正确的SELECT语句是______。
G: SELECT * FROM student WHERE YEAR(birthday) NOT IN(1997,1999);
H: SELECT * FROM student WHERE YEAR(birthday)=1997 OR YEAR(birthday)=1999;
I: SELECT * FROM student WHERE YEAR(birthday) IN(1997,1999);
J: SELECT * FROM student WHERE YEAR(birthday) EXISTS(1997,1999);
举一反三
- 查询在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
- 从学生表student查询所有女学生的信息,正确的语句是( )。 A: SELECT B: FROM student where 性别="女"; C: SELECT * FROM student where 性别="女"; D: SELECT ? FROM student where 性别="女"; E: SELECT FROM student where 性别="女";
- 下列 SQL 语句select * from student where sno = '05880101'union select * from student where sno = '05880102'与此查询语句等价的选项是( )。 A: select * from student where sno= '05880101' and sno= '05880102' B: select * from student where sno= '05880101' or sno= '05880102' C: select * from student where sno= '05880101' D: select * from student where sno= '05880102'
- 查询所有成绩均大于80分的学生姓名,应执行( )语句 A: SELECT SNAME FROM STUDENT WHERE EXISTS (SELECT *FROM SC WHERE STUDENSNO = SC.SNO AND GRADE> 80); B: SELECT SNAME FROM STUDENT WHERE EXISTS (SELECT *FROM SC WHERE STUDENSNO = SC.SNO AND GRADE C: SELECT SNAME FROM STUDENT WHERE NOT EXISTS (SELECT *FROM SC WHERE STUDENSNO = SC.SNO AND GRADE D: SELECT SNAME FROM STUDENT WHERE NOT EXISTS (SELECT *FROM SC WHERE STUDENSNO = SC.SNO AND GRADE> 80);
- 在所有学生中查询比计算机系所有学生年龄都要大的学生姓名,正确的查询语句是___________________。 A: SELECT Sname FROM Student WHERE Sage > ( SELECT MAX(Sage) FROM Student WHERE Sdept = 'CS'); B: SELECT Sname FROM Student WHERE Sage > ALL ( SELECT Sage FROM Student WHERE Sdept = 'CS'); C: SELECT Sname FROM Student S1 WHERE EXISTS ( SELECT Sage FROM Student S2 WHERE Sdept = 'CS' AND S1.Sage > S2.Sage); D: SELECT Sname FROM Student S1 WHERE NOT EXISTS ( SELECT * FROM Student S2 WHERE Sdept = 'CS' AND S1.Sage <= S2.Sage);