题目内容:
试题基于如下三个关系,其中学生关系student的主码是sno,课程关系course的主码是cno,选课关系SC的主码是(sno,cno)。查找学生姓名及其所选修课程的课程号和成绩,正确的SQL语句是( )。
A)SELECT sname FROM student,SELECT cno,grade FROM sc
WHERE student.sno=sc.sno
B)SELECT sname, cno,grade FROM student,course
WHERE student.sno=course.cno
C)SELECT sname, cname,grade FROM student,course, sc
WHERE student.sno=sc.Snoand sc.cno=course.cno
D)SELECT sname,cno, grade FROM student,sc
WHERE student.sno=sc.sno
参考答案:
答案解析: