(1)查询学生的基本信息;
select * from S;
(2)查询“CS”系学生的基本信息;
select * from S where Sdept =’CS’;
(3)查询“CS”系学生年龄不在19到21之间的学生的学号、姓名;
select Sno, Sname from S
where Sdept = ‘CS’ and Sage not
Between 19 and 21;
(4)找出最大年龄;
select max(Sage) from S;
(5)找出“CS”系年龄最大的学生,显示其学号、姓名;
select * from S whereSage= (select max(Sage) from S where Sdept = 'CS');
(6)找出各系年龄最大的学