• 2022-06-09
    没有选修c01课程同学的学号 SELECT
    sno FROM student WHERE
    _______________
    A: cno<>'c01'
    B: cno!='c01'
    C: sno
    not in(SELECT sno FROM sc WHERE cno='c01')
    D: NOT
    EXISTS(SELECT * FROM sc WHERE cno='c01'AND student.sno=sno)
  • C,D

    举一反三

    内容

    • 0

      已知学生选课信息表:sc(sno,cno,grade)。查询“至少选修了一门课程,但没有学习成绩的学生学号和课程号”的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=

    • 1

      “查询没有学习成绩的学生的学号和课程号”的SQL语 句是( ) (2.0) 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 = ' '

    • 2

      查询实现同时选修了C1和C2号课程的学生学号,下列代码正确的是( )。 A: SELECT sno FROM SC WHERE Cno='C1' AND Cno='C2'; B: SELECT sno FROM SC WHERE Cno='C1' AND Sno IN ( SELECT sno FROM SC WHERE Cno='C2' );

    • 3

      查询所有有成绩的学生学号和课程号。正确的SELECT语句是()。 A: Select sno , cno from sc where grade < > null B: Select sno as 学号, cno as 课程号 from sc where grade is not null C: Select sno , cno from sc where grade !=‘ ’ D: Select sno , cno from sc where grade is not null

    • 4

      查询未选修1号课程的同学的姓名,用select sno from studentwhere not exists (select sno from sc where sno=student.sno and cno='1');