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)
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 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) (分别代表课程的编号、课程名、任课教师) “从学生关系S中检索姓′王′的学生学号”的SQL语句是 A: SELECT sno FROM sc WHERE sname=′王′ B: SELECT sno FROM sc WHERE sname IS LIKE′王%′ C: SELECT sno FROM sc WHERE sname LIKE′王%′ D: SELECT sno FROM sc WHERE sname LIKE′王_′