查询计算机系任意学生选修过的课程号,不正确的查询语句是:
A: SELECT DISTINCT CnoFROM SCWHERE NOT EXISTS (SELECT SnoFROM StudentWHERE Sdept = 'CS'AND SSno = Student.Sno);
B: SELECT DISTINCT CnoFROM SCWHERE EXISTS (SELECT SnoFROM StudentWHERE Sdept = 'CS'AND SSno = Student.Sno);
C: SELECT DISTINCT CnoFROM SCWHERE Sno IN (SELECT SnoFROM StudentWHERE Sdept = 'CS');
D: SELECT DISTINCT CnoFROM SCLEFT JOIN StudentON SSno = Student.SnoWHERE Sdept = 'CS';
A: SELECT DISTINCT CnoFROM SCWHERE NOT EXISTS (SELECT SnoFROM StudentWHERE Sdept = 'CS'AND SSno = Student.Sno);
B: SELECT DISTINCT CnoFROM SCWHERE EXISTS (SELECT SnoFROM StudentWHERE Sdept = 'CS'AND SSno = Student.Sno);
C: SELECT DISTINCT CnoFROM SCWHERE Sno IN (SELECT SnoFROM StudentWHERE Sdept = 'CS');
D: SELECT DISTINCT CnoFROM SCLEFT JOIN StudentON SSno = Student.SnoWHERE Sdept = 'CS';
举一反三
- 查询计算机系任意学生选修过的课程号,不正确的查询语句是: A: SELECT DISTINCT CnoFROM SCWHERE NOT EXISTS (SELECT SnoFROM StudentWHERE Sdept = 'CS'AND SC.Sno = Student.Sno); B: SELECT DISTINCT CnoFROM SCWHERE EXISTS (SELECT SnoFROM StudentWHERE Sdept = 'CS'AND SC.Sno = Student.Sno); C: SELECT DISTINCT CnoFROM SCWHERE Sno IN (SELECT SnoFROM StudentWHERE Sdept = 'CS'); D: SELECT DISTINCT CnoFROM SCLEFT JOIN StudentON SC.Sno = Student.SnoWHERE Sdept = 'CS';
- 查询计算机系任意学生选修过的课程号,可以使用如下语句:SELECT DISTINCT CnoFROM SCWHERE Sno IN (SELECT SnoFROM StudentWHERE Sdept = 'CS');
- 查询非计算机系中比计算机系中年龄最小者年龄大或相等的学生姓名,不正确的查询语句是: A: SELECT SnameFROM Student S1WHERE NOT EXISTS (SELECT *FROM Student S2WHERE S2.Sdept = 'CS'AND S1.Sage ;= S2.Sage)AND Sdept != 'CS'; B: SELECT SnameFROM StudentWHERE Sage >;= (SELECT MIN(Sage) FROMStudentWHERE Sdept = 'CS')AND Sdept != 'CS'; C: SELECT SnameFROM StudentWHERE Sage >;= ANY (SELECT SageFROM StudentWHERE Sdept = 'CS')AND Sdept != 'CS';
- 查询没有选修1号课程的学生姓名()。 A: select snamefrom student,scwhere student.sno=sc.sno and cno!='1' B: select snamefrom sno not in(select snofrom scwhere cno='1' ) C: select snamefrom sno in(select snofrom scwhere cno!='1' ) D: select snamefrom sno not exists(select*from scwhere student.sno and sc.sno and cno='1' )
- 选择题:在所有学生中查询比计算机系学生平均年龄大的学生姓名,可以使用的查询语句是: A: SELECT SnameFROM StudentWHERE Sage >; (SELECT AVG(Sage)FROM Student);WHERE Sdept = 'CS' B: SELECT SnameFROM StudentWHERE Sage >; AVG(SELECT SageFROM StudentWHERE Sdept = 'CS'); C: SELECT SnameFROM StudentWHERE Sage >; (SELECT AVG(Sage)FROM StudentWHERE Sdept = 'CS'); D: SELECT SnameFROM StudentWHERE AVG(Sage) >; (SELECT SageFROM StudentWHERE Sdept = 'CS');