“Select Sno,Sname,Ssex,Sage,Smajor From Student”检索语句中,用来分隔开字段名的逗号,需要是纯英文的逗号,不能是中文逗号
举一反三
- 设有学生表student(sno,sname,sage,smajor),字段含义分别为学生学号、姓名、年龄、专业,现有语句:SELECT sno,sname,sage,smajor FROM student ORDER BY smajor,sage DESC;执行上述语句,其检索结果( ) A: 按smajor升序,sage降序排列 B: 按smajor降序,sage升序排列 C: 按smajor及sage的降序排列 D: smajor及sage的升序排列
- 要在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='女'
- 现要利用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
- 【多选题】针对学生表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
- 针对学生表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;