没有选修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)
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)
举一反三
- 查询编号为'c01'的课程考试成绩在80-89之间的学生的学号,下列()语句不能实现。 A: select sno ,grade from sc where cno='c01' and grade between 80 and 89 B: select sno ,grade from sc where cno='c01' and grade>=80 and grade<90 C: select sno ,grade from sc where cno='c01' and not (grade90) D: select sno ,grade from sc where cno='c01' and grade in (80-89)
- 下列查询中,属于相关子查询的有()。 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));
- 查询选课关系SC(Sno,Cno,Score)表中还没有给定成绩()的课程号()和学号(),下列语句正确的是。() A: SELECT<br/>Sno,Cno<br/>FROM SC WHERE Score IS NULL B: SELECT*<br/>FROM SC WHERE Score =NULL C: SELECT<br/>Sno,Cno<br/>FROM SC D: SELECT<br/>Score FROM SC WHERE Sno,Cno<br/>IS NOT NULL
- 以下命令是相关子查询的嵌套查询是: A: SELECT * FROM student WHERE sno IN (SELECT sno FROM sc WHERE cno = '1') B: SELECT * FROM student WHERE EXISTS (SELECT * FROM sc WHERE cno = '1' AND sc.sno = student.sno) C: SELECT sno, cno FROM sc x WHERE grade>(SELECT AVG(grade) FROM sc y WHERE y.sno = x.sno) D: 以上都是
- 检索选修了课程”C1”的学生中成绩最高的学生的学号,正确的SELECT语句为( ) A: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE >=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 > ANY (SELECT Grade FROM SC WHERE Cno=’C1’); D: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE >= (SELECT Grade FROM SC WHERE Cno=’C1’);