查询选修了'数据库基础'课程的同学的学号,和这些同学选修的全部课程号和分数.select sno,cno,gradefrom ______________________ A: sc where sno in (select sno from sc join course on sc.cno=course.cno where cname='数据库基础') B: sc join course on sc.cno=course.cno where cname='数据库基础' C: sc where sno in (select sno from course where cname='数据库基础') D: sc where cno in (select cno from course where cname='数据库基础')
查询选修了'数据库基础'课程的同学的学号,和这些同学选修的全部课程号和分数.select sno,cno,gradefrom ______________________ A: sc where sno in (select sno from sc join course on sc.cno=course.cno where cname='数据库基础') B: sc join course on sc.cno=course.cno where cname='数据库基础' C: sc where sno in (select sno from course where cname='数据库基础') D: sc where cno in (select cno from course where cname='数据库基础')
在“学生-选课-课程”数据库中的3个关系如下:S(SNO, SNAME, SEX, AGE); C(CNO, CNAME, TEACHER);SC(SNO, CNO, GRADE),查询既选修了“2”号又选修了“4”号课程的学生学号。若用关系代数表达式来表示为( )。 A: ПSNO (σCNO=’2’(SC) ∩ σCNO=’4’(SC) ) B: ПSNO (σCNO=’2’(SC)) ¥ ПSNO(σCNO=’4’(SC) ) C: ПSNO (σCNO=’2’(SC) ∪ σCNO=’4’(SC) ) D: σCNO=’2’(SC) ¥σCNO=’4’(SC)
在“学生-选课-课程”数据库中的3个关系如下:S(SNO, SNAME, SEX, AGE); C(CNO, CNAME, TEACHER);SC(SNO, CNO, GRADE),查询既选修了“2”号又选修了“4”号课程的学生学号。若用关系代数表达式来表示为( )。 A: ПSNO (σCNO=’2’(SC) ∩ σCNO=’4’(SC) ) B: ПSNO (σCNO=’2’(SC)) ¥ ПSNO(σCNO=’4’(SC) ) C: ПSNO (σCNO=’2’(SC) ∪ σCNO=’4’(SC) ) D: σCNO=’2’(SC) ¥σCNO=’4’(SC)
在“学生-选课-课程”数据库中的三个关系如下: S(SNO,SNAME,SEX,AGE), SC(SNO,CNO,GRADE), C(CNO,CNAME,TEACHER)。 查找选修“数据库技术”这门课的学生的学生姓名和成绩。若使用连接查询的SQL语句是:SELECT SNAME,GRADE FROM S,SC,C WHERE( )。 A: CNAME=“数据库技术”AND S.SNO=SC.SNO AND SC.CNO=C.CNO B: CNAME=“数据库技术”AND S.SNO=SC.SNO AND SC.CNO=CNO C: CNAME=数据库技术AND S.SNO=SC.SNO AND SC.CNO=C.CNO D: CNAME=“数据库技术”AND S.SNO=SC.SNO
在“学生-选课-课程”数据库中的三个关系如下: S(SNO,SNAME,SEX,AGE), SC(SNO,CNO,GRADE), C(CNO,CNAME,TEACHER)。 查找选修“数据库技术”这门课的学生的学生姓名和成绩。若使用连接查询的SQL语句是:SELECT SNAME,GRADE FROM S,SC,C WHERE( )。 A: CNAME=“数据库技术”AND S.SNO=SC.SNO AND SC.CNO=C.CNO B: CNAME=“数据库技术”AND S.SNO=SC.SNO AND SC.CNO=CNO C: CNAME=数据库技术AND S.SNO=SC.SNO AND SC.CNO=C.CNO D: CNAME=“数据库技术”AND S.SNO=SC.SNO
检索选课人数少于4人的课程号。正确的SQL语句是( ) A: SELECT CNO FROM SC WHERE COUNT(*)<;4 B: SELECT CNO FROM SC GROUP BY CNO HAVING COUNT(*)<;4 C: SELECT DISTINCT CNO FROM SC ORDER BY CNO D: SELECT CNO FROM SC WHERE COUNT(CNO)<;4
检索选课人数少于4人的课程号。正确的SQL语句是( ) A: SELECT CNO FROM SC WHERE COUNT(*)<;4 B: SELECT CNO FROM SC GROUP BY CNO HAVING COUNT(*)<;4 C: SELECT DISTINCT CNO FROM SC ORDER BY CNO D: SELECT CNO FROM SC WHERE COUNT(CNO)<;4
下列查询中,属于相关子查询的有()。 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));
下列查询中,属于相关子查询的有()。 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和Student表连接起来,显示学生的学号、姓名、课程号、考试分数,不正确的SQL语句是( )。 A: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentWhere SC.Sno=Student.Sno B: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC Join StudentOn SC.Sno=Student.Sno C: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom Student Join SC On SC.Sno=Student.Sno D: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentOn SC.Sno=Student.Sno
将SC和Student表连接起来,显示学生的学号、姓名、课程号、考试分数,不正确的SQL语句是( )。 A: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentWhere SC.Sno=Student.Sno B: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC Join StudentOn SC.Sno=Student.Sno C: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom Student Join SC On SC.Sno=Student.Sno D: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentOn SC.Sno=Student.Sno
将SC和Student表连接起来,显示学生的学号、姓名、课程号、考试分数,不正确的SQL语句是( )。 A: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentWhere SC.Sno=Student.Sno B: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC Join StudentOn SC.Sno=Student.Sno C: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom Student Join SC On SC.Sno=Student.Sno D: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentOn SC.Sno=Student.Sno
将SC和Student表连接起来,显示学生的学号、姓名、课程号、考试分数,不正确的SQL语句是( )。 A: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentWhere SC.Sno=Student.Sno B: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC Join StudentOn SC.Sno=Student.Sno C: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom Student Join SC On SC.Sno=Student.Sno D: Select Student.Sno,Student.Sname, SC.Cno,SC.GradeFrom SC,StudentOn SC.Sno=Student.Sno
检索选修课程“C2”的学生中成绩最高的学生的学号。正确的SELECT语句是()。 A: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ( SELECT GRADE FORM SC WHERE CNO='C2' ); B: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); C: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE NOT IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); D: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ALL ( SELECT GRADE FORM SC WHERE CNO='C2' );
检索选修课程“C2”的学生中成绩最高的学生的学号。正确的SELECT语句是()。 A: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ( SELECT GRADE FORM SC WHERE CNO='C2' ); B: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); C: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE NOT IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); D: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ALL ( SELECT GRADE FORM SC WHERE CNO='C2' );
下列SQL语句中,_________可以在“学生-课程”数据库正确实现“查询所有选修了1号课程的学生姓名”。 A: SELECT SnameFROM Student, SCWHERE SC.Cno= '1' B: SELECT SnameFROM Student, SCWHERE Student.Sno=SC.Sno AND SC.Cno= 1 C: SELECT Sname FROM Student WHERE Sno= (SELECT Sno FROM SC WHERE Cno= '1') D: SELECT Sname FROM Student WHERE EXISTS (SELECT * FROM SC WHERE Sno=Student.Sno AND Cno= '1')
下列SQL语句中,_________可以在“学生-课程”数据库正确实现“查询所有选修了1号课程的学生姓名”。 A: SELECT SnameFROM Student, SCWHERE SC.Cno= '1' B: SELECT SnameFROM Student, SCWHERE Student.Sno=SC.Sno AND SC.Cno= 1 C: SELECT Sname FROM Student WHERE Sno= (SELECT Sno FROM SC WHERE Cno= '1') D: SELECT Sname FROM Student WHERE EXISTS (SELECT * FROM SC WHERE Sno=Student.Sno AND Cno= '1')
检索选修了课程”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’);
检索选修了课程”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’);