A: SELECT Sname,MIN(Sage) FROM Student
B: SELECT Sname,Sage FROM Student WHERE Sage = MIN(Sage)
C: SELECT TOP 1 Sname,Sage FROM Student
D: SELECT TOP 1 Sname,Sage FROM Student ORDER BY Sage
举一反三
- 现要利用Student表查询年龄最小的学生姓名和年龄。下列实现此功能的查询语句中,正确的是()。 A: SELECT Sname,MIN(Sage) FROM Student B: SELECT Sname,Sage FROM Student WHERE Sage = MIN(Sage) C: SELECT TOP 1 Sname,Sage FROM Student D: SELECT TOP 1 Sname,Sage FROM Student ORDER BY Sage
- 现要利用Student(sno, sname, ssex, sage, sdept)表查询年龄最小的学生的姓名和年龄。下列实现此功能的查询语句正确的是( )。 A: SELECT sname, Min( sage )from student B: SELECT sname ,sage from student where sage=Min( sage ) C: SELECT TOP 1 Sname , Sage From student D: SELECT TOP 1 sname , sage from student order by sage
- 在所有学生中查询比计算机系学生平均年龄大的学生姓名,可以使用的查询语句是: A: SELECT Sname FROM Student WHERE Sage > ( SELECT AVG(Sage) FROM Student ); WHERE Sdept = 'CS' B: SELECT Sname FROM Student WHERE Sage > AVG( SELECT Sage FROM Student WHERE Sdept = 'CS' ); C: SELECT Sname FROM Student WHERE Sage > ( SELECT AVG(Sage) FROM Student WHERE Sdept = 'CS' ); D: SELECT Sname FROM Student WHERE AVG(Sage) > ( SELECT Sage FROM Student WHERE Sdept = 'CS' );
- 针对学生表Student(Sno,Sname, Ssex,Sage,Sdept)。要检索学生表中年龄在17至25岁之间(包括17和25)的学生的姓名及年龄,SQL语句正确的是( )。 A: Select * From Student Where Sage between 17 and 25 B: Select Sname, Sage From Student Where Sage between 17 and 25 C: Select Sname, Sage From Student Where Sage >= 17 and Sage<= 25 D: Select Sname, Sage From Student Where Sage >= 17 or Sage<= 25
- 在所有学生中查询比计算机系所有学生年龄都要大的学生姓名,正确的查询语句是___________________。 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);
内容
- 0
要在student(sno,sname,ssex,sage,sdept)表中,查询全体女生的姓名、年龄,以下正确的查询语句是( )。 A: select * from student where ssex='女' B: select 姓名, 年龄 from student where 性别 ='女' C: select sname , sage from student where ssex='女’ D: select sname 姓名, sage 年龄 from student where ssex='女'
- 1
【多选题】针对学生表Student(Sno,Sname, Ssex,Sage,Sdept),其中sno为学号,sname为姓名,ssex为性别,sage为年龄,sdept为系别。要检索学生表中年龄在17至25岁之间(包括16和30)的学生的姓名及年龄,SQL语句正确的是()。 A. Select * From Student Where Sage between 16 and 30 B. Select Sname, Sage From Student Where Sage between 16 and 30 C. Select Sname, Sage From Student Where Sage >= 16and Sage<= 30 D. Select Sname, Sage From Student Where Sage >= 16 or Sage<= 30
- 2
针对学生表Student(Sno,Sname, Ssex,Sage,Sdept)。要检索学生表中年龄在17至25岁之间(包括17和25)的学生的姓名及年龄,SQL语句正确的是( )。 A: Select * From Student Where Sage between 17 and 25 B: Select Sname, Sage From Student Where Sage between 17 and 25 C: Select Sname, Sage From Student Where Sage >= 17 and Sage<= 25 D: Select Sname, Sage From Student Where Sage >= 17 or Sage<= 25
- 3
针对学生表Student(Sno,Sname, Ssex,Sage,Sdept),其中sno为学号,sname为姓名,ssex为性别,sage为年龄,sdept为系别。要检索学生表中年龄在17至25岁之间(包括16和30)的学生的姓名及年龄,SQL语句正确的是( )。 A: Select Sname, Sage From Student Where Sage between 16 and 30; B: Select Sname, Sage From Student Where Sage >= 16and Sage<= 30; C: Select * From Student Where Sage between 16 and 30; D: Select Sname, Sage From Student Where Sage >= 16 or Sage<= 30;
- 4
【单选题】针对学生表student(sno,sname,ssex,sage,sdept),其中sno为学号,sname为姓名,ssex为性别,sage为年龄,sdept为系别。查询学生的姓名sname,系别sdept和年龄sage,显示时按系别升序排列,系别相同的再按年龄降序排列。() A. select * from student order by sdept , sage B. select sname, sdept, sage from student order by sdept , sage desc C. select sname, sdept, sage from student order by sdept desc , sage D. select * from student order by sdept desc, sage