设有学生表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的升序排列
A: 按smajor升序,sage降序排列
B: 按smajor降序,sage升序排列
C: 按smajor及sage的降序排列
D: smajor及sage的升序排列
举一反三
- 【单选题】针对学生表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
- 设有学生表student(sno,sname,sage,smajor),各字段的含义分别是学生学号、姓名、年龄和专业。要求输入一学生记录,学号为100,姓名为张红,年龄为20。以下不能完成如上输入要求的语句是( )。 A: INSERT INTO student VALUES(100,'张红',20); B: INSERT INTO student(sno,sname,sage,smajor) VALUES(100,'张红',20,NULL); C: INSERT INTO student VALUES(100,'张红',20,NULL); D: INSERT INTO student(sno,sname,sage) VALUES(100,'张红',20);
- 设有学生表Student(sno,sname,sage,smajor),各字段的含义分别是学生学号、姓名、年龄和专业。要求输入一学生记录,学号为100,姓名为张红,年龄为20.以下不能完成如上输入要求的语句是________。 A: INSERT INTO student(sno,sname,sage,smajor) VALUES(100,'张红',20,NULL); B: INSERT INTO student VALUES(100,'张红',20,NULL); C: INSERT INTO student(sna,sname,sage) VALUES(100,'张红',20); D: INSERT INTO student VALUES(100,'张红',20);
- 设有学生表student(sno,sname,sage,smajor),各字段的含义分别是学生学号、姓名、年龄和专业。要求输入一学生记录,学号为100,姓名为张红,年龄为20。以下不能完成如上输入要求的语句是 ( ) A: INSERT INTO student VALUES(100,'张红',20); B: INSERT INTO student(sno,sname,sage,smajor) VALUES(100,'张红',20,NULL); C: INSERT INTO student VALUES(100,'张红',20,NULL); D: 无
- 【多选题】针对学生表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