已知关系模式:sc(sno,sname,grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是
A: SELECT sno FROM sc WHERE sname = "数据库" AND grade = MAX(grade)
B: SELECT sno FROM sc FOR sname = "数据库" OR grade>=MAX(grade)
C: SELECT sno FROM sc WHERE sname = "数据库" AND grade = (SELECT MAX(grade) FROM sc)
D: SELECT sno FROM sc FOR sname = "数据库" OR grade = (SELECT MAX(grade) FROM sc)
A: SELECT sno FROM sc WHERE sname = "数据库" AND grade = MAX(grade)
B: SELECT sno FROM sc FOR sname = "数据库" OR grade>=MAX(grade)
C: SELECT sno FROM sc WHERE sname = "数据库" AND grade = (SELECT MAX(grade) FROM sc)
D: SELECT sno FROM sc FOR sname = "数据库" OR grade = (SELECT MAX(grade) FROM sc)
举一反三
- 已知关系模式:SC(sno,sname,grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是( )。 A: SELECT sno FROM sc WHERE sname="数据库"AND grade=MAX(grade) B: SELECT sno FROM sc FOR sname="数据库"OR grade>=MAX(grade) C: SELECT sno FROM sc WHERE sname="数据库"AND grade=(SELECT MAX(grade)FROM sc) D: SELECT sno FROM sc FOR sname="数据库"OR grade=(SELECT MAX(grade)FROM s
- 已知关系模式:sc(sno,sname,grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是( )。 A: SELECT sno FROM sc WHERE sname="数据库"AND grade=MAX(grad B: SELECT sno FROM sc FOR sname="数据库"OR grade>=MAX(grad C: SELECT sno FROM sc WHERE sname="数据库"AND grade=(SELECT MAX(grad FROM s D: SELECT sno FROM sc FOR sname="数据库"OR grade=(SELECT MAX(grad FROM s
- 已知关系模式:sc(sno,sname,grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是()。 A: SELECT sno FROM SC. WHERE sname="数据库"AND. grade=MAX(grade) B: SELECT sno FROM SC. FOR sname="数据库"OR grade>MAX(grade) C: SELECT sno FROM SC. WHERE shame="数据库"AND. grade=(SELECT MAX(grade)FROM sc) D: SELECT son FROM SC. FOR sname="数据库"OR grade=(SELECT MAX(grade. FROM sc)
- 23~24 题基于以下说明。设有三个关系: 学生关系S(SNO,SNAME,AGE,SEX) (分别代表学生的学号、姓名、年龄、性别) 学习关系SC(SNO,CNO,GRADE) (分别代表学生的学号、课程编号、成绩) 课程关系C(CNO,CNAME,TEACHER) (分别代表课程的编号、课程名、任课教师) 已知关系模式:sc(sno,sname,grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是 。 A: SELECT sno FROM sc WHERE sname="数据库"AND grade=MAX(grade) B: SELECT sno FROM sc FOR sname="数据库"OR grade>=MAX(grade) C: SELECT sno FROM sc WHERE sname="数据库"AND grade=(SELECT MAX (grade) FROM sc) D: SELECT sno FROM sc FOR sname="数据库" OR grade=(SELECT MAX (grade) FROM sc)
- 关系SC(Sno,Cno,Grade)表示学号,课程号,成绩。现要查询最高分在91分以上的学生的学号和平均成绩,正确的语句是______。 A: SELECT Sno,MAX(Grade) FROM SC WHERE MAX(Grade)>=91 GROUP BY Sno B: SELECT Sno,MAX(Grade) FROM SC GROUP RY Sno HAVING MAX(Grade)>=91 C: SELECT Sno,MAX(Grade) FROM SC WHERE MAX(Grade)>=91 ORDER BY Sno D: SELECT Sno,MAX(Grade) FROM SC GROUP BY Cno HAVING MAX(Grade)>=91