• 2022-10-26
    列出SC表中所有考试不及格的学生的学号Sno(无须重复),其SQL语句为( )
    A: SELECT DISTINCT Sno FROM SC WHERE Grade<60;
    B: SELECT DISTINCT Sno FROM SC WHERE Grade IS NULL;
    C: SELECT Sno FROM SC WHERE Grade<60;
    D: SELECT ALL Sno FROM SC WHERE Grade<60;
  • A

    举一反三

    内容

    • 0

      有如下的SQL语句: Ⅰ.SELECT sname FROM s, sc WHERE grade&lt;60 Ⅱ.SELECT sname FROM s WHERE sno IN(SELECT sno FROM sc WHERE grade&lt;60) Ⅲ.SELECT sname FROM s, sc WHERE s.sno=sc.sno AND grade&lt;60 若要查找分数(grade)不及格的学生姓名(sname),则以上正确的有哪些?( ) A: Ⅰ和Ⅱ B: Ⅰ和Ⅲ C: Ⅱ和Ⅲ D: Ⅰ、Ⅱ和Ⅲ

    • 1

      已知学生选课信息表: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=

    • 2

      在学生选课数据库中,查询平均成绩大于等于60分的同学,SQL语句为( ) A: SELECT Sno, AVG(Grade) FROM SC GROUP BY Sno HAVING AVG(Grade)>=60; B: SELECT Sno FROM SC WHERE Grade>=60 GROUP BY Sno; C: SELECT Sno, Grade FROM SC GROUP BY Sno HAVING AVG(Grade)>=60; D: SELECT Sno FROM SC GROUP BY Sno HAVING Grade >=60;

    • 3

      检索选修了课程”C1”的学生中成绩最高的学生的学号,正确的SELECT语句为( ) A: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE &gt;=ALL (SELECT Grade FROM SC WHERE Cno=’C1’); B: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE IN (SELECT Grade FROM SC WHERE Cno=’C1’); C: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE &gt; ANY (SELECT Grade FROM SC WHERE Cno=’C1’); D: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE &gt;= (SELECT Grade FROM SC WHERE Cno=’C1’);

    • 4

      查询曾经考过100分的学生的学号,可以使用的SQL语句是:( ) A: SELECT ALL Sno FROM SC WHERE Grade = 100; B: SELECT DISTINCT Sno FROM SC WHERE Grade = 100; C: SELECT ALL Sno FROM Student WHERE SGrade = 100; D: SELECT DISTINCT Sno FROM Student WHERE SGrade = 100;