有如下的SQL语句:Ⅰ. SELECT sname FROM s, sc WHERE grade<60Ⅱ. SELECT sname FROM s WHERE sno IN(SELECT sno FROM sc WHERE grade<60)Ⅲ. SELECT sname FROM s, sc WHERE s.sno=sc.sno AND grade<60若要查找分数(grade)不及格的学生姓名(sname),则以上正确的有哪些?()
A. Ⅰ和Ⅱ
B. Ⅰ和Ⅲ
C. Ⅱ和Ⅲ
D. Ⅰ、Ⅱ和Ⅲ
查看答案
基于这样的3个表,即学生表S、课程表C和学生选课表SC,它们的关系模式如下:S(S#,SN,SEX,AGE,DEPT)(学号,姓名,性别,年龄,系别)C(C#,CN)(课程号,课程名称)SC(S#,C#,GRADE)(学号,课程号,成绩).检索选修课程“C2”的学生中成绩最高的学生的学号。正确的SELECT语句是()。
A. SELECT S
B. FROM SC WHERE C
C. =C2 AND GRADE>=(SELECT GRADE FROM SC WHERE C
D. ='C2')
E. SELECT S
FROM SC WHERE C
G. =C2 AND GRADE IN(SELECT GRADE FROM SC WHERE C
H. ='C2')
I. SELECT S
J. FROM SC WHERE C
K. =C2 AND GRADE NOT IN (SELECT GRADE GORM SC WHERE C
L. ='C2')
M. SELECT S
N. FROM SC WHERE C
O. =C2 AND GRADE>=ALL(SELECT GRADE FROM SC WHERE C
P. ='C2')
现有学生表S、课程表C和学生选课表SC,它们的关系模式如下。S(S#,SN,SEX,AGE,DEPT)(学号,姓名,性别,年龄,系别);C(C#,CN)(课程号,课程名称);SC(S#,C#,GRADE)(学号,课程号,成绩)。检索所有比“王华”年龄大的学生姓名、年龄和性别。下面正确的SELECT语句是()。
A. SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE FROM S WHERE SN='王华')
B. SELECT SN,AGE,SEX FROM S WHERE SN='王华'
C. SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE WHERE SN='王华')
D. SELECT SN,AGE,SEX FROM S WHERE SGE>'王华'.AGE
能实现查询sell表中尚未发货的订单记录的语句是()。
A. SELECT * FROM sell WHERE 是否发货=NULL;
B. SELECT * FROM sell WHERE 是否发货 IS NULL;
C. SELECT * FROM sell WHERE 是否发货IS NOT NULL;
D. SELECT * FROM sell ORDER BY 是否发货;
在SELECT语句中,可以使用()子句,根据选择列的值,将结果集中的数据行进行逻辑分组,以便能汇总表内容的子集,实现对每个组的聚集计算。
A. LIMIT
B. WHERE
C. GROUP BY
D. ORDER BY