将SC和Student表连接起来,显示学生的学号、姓名、课程号、考试分数,不正确的SQL语句是( )。
A: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentWhere SC.Sno=Student.Sno
B: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC Join StudentOn SC.Sno=Student.Sno
C: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom Student Join SC On SC.Sno=Student.Sno
D: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentOn SC.Sno=Student.Sno
A: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentWhere SC.Sno=Student.Sno
B: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC Join StudentOn SC.Sno=Student.Sno
C: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom Student Join SC On SC.Sno=Student.Sno
D: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentOn SC.Sno=Student.Sno
举一反三
- 将SC和Student表连接起来,显示学生的学号、姓名、课程号、考试分数,不正确的SQL语句是( )。 A: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentWhere SC.Sno=Student.Sno B: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC Join StudentOn SC.Sno=Student.Sno C: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom Student Join SC On SC.Sno=Student.Sno D: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentOn SC.Sno=Student.Sno
- 查询每个学生的学号、姓名、选修的课程名及成绩,下列()的操作是正确的。 A: select student,sno,sname,grade from student,sc where student.sno=sc.sno and sc.cno=course.cno B: select student,sno,sname,grade from student,sc,cource where student.sno=sc.sno C: select student,sno,sname,grade from student,sc,cource where sc.cno=course.cno D: select student,sno,sname,grade from student,sc,cource where student.sno=sc.sno and sc.cno=course.cno
- 在学生选课数据库中,查询选修了课程的学生的学号、姓名,SQL语句可为( ) A: SELECT DISTINCT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; B: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; C: SELECT DISTINCT Sno, DISTINCT Sname FROM Student WHERE Student.Sno IN (SELECT Sno FROM SC); D: SELECT Sno, Sname FROM Student WHERE Student.Sno IN (SELECT DISTINCT Sno FROM SC);
- 下列查询中,属于相关子查询的有()。 A: SELECT * FROM student WHERE sno IN (SELECT sno FROM sc WHERE cno='1'); B: SELECT sno, cno FROM SC x WEHRE grade>=(SELECT AVG(grade) FROM SC y WHERE y.sno = x.sno); C: SELECT sname FROM student WHERE EXISTS(SELECT * FROM sc WHERE sno=student.sno AND cno='1'); D: SELECT sname FROM student WHERE NOT EXISTS(SELECT * FROM course WHERE NOT EXISTS(SELECT * FROM sc WHERE sc.sno=student.sno AND sc.cno=course.cno));
- 下列SQL语句中,_____________可以在“学生-课程”数据库正确实现“查询选修2号课程且成绩在90分以上的所有学生的学号和姓名”。 A: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno ANDSC.Cno= ‘2’ AND SC.Grade > 90 B: SELECT Student.Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno ANDSC.Cno=‘2’AND SC.Grade > 90 C: SELECT Sno, Sname FROM Student, SC WHERE SC.Cno=‘2’AND SC.Grade > 90 D: SELECT Student.Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno AND SC.Grade > 90