• 2022-05-29
    查询每个学生的学号、姓名、选修的课程名及成绩,下列()的操作是正确的。
    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
  • D

    举一反三

    内容

    • 0

      同时选修了‘数据结构’和‘操作系统’2门课程的同学学号、姓名。select student.sno,sname from student,sc,coursewhere student.sno=sc.sno and course.cno=sc.cnoand _________________________________________________ A: cname='数据结构' and student.sno in(select sno from sc,course where sc.cno=course.cno and cname='操作系统') B: cname='操作系统' and student.sno in(select sno from sc,course where sc.cno=course.cno and cname='数据结构') C: cname='数据结构' and cname='操作系统' D: student.sno in(select sno from sc,course where sc.cno=course.cno and cname='操作系统'and cname='数据结构')

    • 1

      【多选题】针对学生选课数据库S_T,以下()操作实现了student表与sc之间的自然连接。 A. select student.* ,  cno,  grade  from student  join   sc  on  student.sno=sc.sno B. select student.* ,  sc.*  from student ,  sc  where student.sno=sc.sno C. select student.sno, sname, ssex, sage, sdept , cno, grade  from student ,  sc  where student.sno=sc.sno D. select student.* , cno, grade  from student ,  sc  where  student.sno=sc.sno

    • 2

      下列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

    • 3

      基于学生—选课—课程数据库中的三个基本表:学生的信息表:STUDENT(sno, sname, sex, age, dept)主码为sno课程信息表:COURSE(cno,cname, teacher)主码为cno学生选课信息表:SC(sno, cno, grade)主码为(sno, cno) “查询没有学习成绩的学生的学号和课程号”的SQL语句是()。 A: SELECT sno, cno FROM SC WHERE grade=NULL B: SELECT sno, cno FROM SC WHERE grade IS" C: SELECT sno, cno FROM SC WHERE grade IS NULL D: SELECT sno, cno FROM SC WHERE grade="

    • 4

      有关系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')