实现“查询学生及其选课情况(基于左外连接)”的SELECT语句为()。A.SELECT S.*, C.* FROM Student S JOIN SC ON S.Sno=SC.SnoB.SELECT S.*, C.* FROM Student S LEFT JOIN SC ON S.Sno=SC.SnoC.SELECT S.*, C.* FROM Student S, SC WHERE S.Sno=SC.SnoD.SELECT S.*, C.* FROM Student S OUTER JOIN SC ON S.Sno=SC.Sno
举一反三
- 有关系S(SNO, SNAME, SAGE),C(CNO, CNAME),SC(SNO, CNO, GRADE)。其中SNO是学生号,SNAME是学生姓名,SAGE是学生年龄, CNO是课程号,CNAME是课程名称,GRADE是成绩。以下( )SQL语句可以实现查询选修了'C002'号课程的学生姓名。 A: SELECT SNAME FROM S, SC WHERE S.SNO=SC.SNO AND CNO='C002' B: SELECT SNAME FROM S WHERE SNO IN (SELECT SNO FROM SC WHERE CNO='C002') C: SELECT SNAME FROM S WHERE SNO = (SELECT SNO FROM SC WHERE CNO='C002') D: SELECT SNAME FROM S WHERE SNO NOT IN (SELECT SNO FROM SC WHERE CNO='C002')
- 有关系S(S#,SNAME,SAGE),C(C#,CNAME),SC(S#,C#,GRADE)。若要查找分数(grade)不及格的学生姓名(sname),则以上正确的有?( ) A: SELECT sname FROM s, sc WHERE grade<60 B: SELECT sname FROM s WHERE sno IN(SELECT Cno FROM sc WHERE grade<60) C: SELECT sname FROM s, sc WHERE s.sno=sc.sno AND grade<60 D: SELECT sname FROM s, sc WHERE s.sno=sc.sno OR grade<60
- 有关系S(S#,SNAME,SAGE),C(C#,CNAME),SC(S#,C#,GRADE)。若要查找分数(grade)不及格的学生姓名(sname),则以上正确的有?( ) A: SELECT sname FROM s, sc WHERE grade<60 B: SELECT sname FROM s WHERE sno IN(SELECT Cno FROM sc WHERE grade<60) C: SELECT sname FROM s, sc WHERE s.sno=sc.sno AND grade<60 D: SELECT sname FROM s, sc WHERE s.sno=sc.sno OR grade<60
- 有如下的SQL语句.Ⅰ. SELECT sname FROM s, sc WHERE gradeⅡ. SELECT sname FROM s WHERE sno IN(SELECT sno FROM sc WHERE gradeⅢ. SELECT sname FROM s, sc WHERE s.sno=sc.sno AND grade若要查找分数(grade)不及格的学生姓名(sname),则以上正确的有哪些?( ) 。 A: Ⅰ和Ⅱ B: Ⅰ和Ⅲ C: Ⅱ和Ⅲ D: Ⅰ、Ⅱ和Ⅲ
- 第(23)~(24)题基于以下说明。设有三个关系: 学生关系S(SNO,SNAME,AGE,SEX)(分别代表学生的学号、姓名、年龄、性别) 学习关系SC(SNO,CNO,GRADE)(分别代表学生的学号、课程编号、成绩) 课程关系C(CNO,CNAME,TEACHER)(分别代表课程的编号、课程名、任课教师) 检索“至少选修课程号为’C1’的学生姓名(SNAME)”的SQL语句是 A: SELECT s. sname FROM s, sc WHERE c. cno=’C1’ B: SELECT s. sname FROM s, sc WHERE c. cno=’C1’AND s. sno=sc. sno C: SELECT s. sname FROM s, sc FOR c. cno=’C1’ D: SELECT s. sname FROM s, sc FOR c. cno=’C1’ AND s. sno=sc. sno