智慧职教: select count(*) from student as s1语句主要查询s1表中的数据个数。
举一反三
- 在所有学生中查询比计算机系所有学生年龄都要大的学生姓名,正确的查询语句是___________________。 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);
- 以下语句可以返回Student表中的所有记录。<br/>Select * from Student where 1 or 0 and 1;
- 使用select * from student可以查询基本表student中的所有数据
- 下面用于查询student表中id值在1,2,3范围内的记录的SQL语句是( )。 A: SELECT * FROM student WHERE id=1,2,3; B: SELECT * FROM student WHERE (id=1,id=2,id=3); C: SELECT * FROM student WHERE id in (1,2,3); D: SELECT * FROM student WHERE id in 1,2,3;
- 查询student表中的gender字段(gender代表性别),使其查询记录中不能出现重复值的SQL语句是(1.0分) A: SELECT gender FROM student; B: SELECT DISTINCT * FROM student; C: SELECT DISTINCT gender FROM student; D: SELECT * FROM student;