• 2022-10-26 问题

    在学生选课数据库中,查询选修了课程的学生的学号、姓名,SQL语句可为( ) A: SELECT DISTINCT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; B: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; C: SELECT DISTINCT Sno, DISTINCT Sname FROM Student WHERE Student.Sno IN (SELECT Sno FROM SC); D: SELECT Sno, Sname FROM Student WHERE Student.Sno IN (SELECT DISTINCT Sno FROM SC);

    在学生选课数据库中,查询选修了课程的学生的学号、姓名,SQL语句可为( ) A: SELECT DISTINCT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; B: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; C: SELECT DISTINCT Sno, DISTINCT Sname FROM Student WHERE Student.Sno IN (SELECT Sno FROM SC); D: SELECT Sno, Sname FROM Student WHERE Student.Sno IN (SELECT DISTINCT Sno FROM SC);

  • 2022-05-29 问题

    查询每个学生的学号、姓名、选修的课程名及成绩,下列()的操作是正确的。 A: select student,sno,sname,grade from student,sc where student.sno=sc.sno and sc.cno=course.cno B: select student,sno,sname,grade from student,sc,cource where student.sno=sc.sno C: select student,sno,sname,grade from student,sc,cource where sc.cno=course.cno D: select student,sno,sname,grade from student,sc,cource where student.sno=sc.sno and sc.cno=course.cno

    查询每个学生的学号、姓名、选修的课程名及成绩,下列()的操作是正确的。 A: select student,sno,sname,grade from student,sc where student.sno=sc.sno and sc.cno=course.cno B: select student,sno,sname,grade from student,sc,cource where student.sno=sc.sno C: select student,sno,sname,grade from student,sc,cource where sc.cno=course.cno D: select student,sno,sname,grade from student,sc,cource where student.sno=sc.sno and sc.cno=course.cno

  • 2022-06-09 问题

    查询没有选数据库基础课程的同学学号和姓名。select sno,sname from student where ____________(select ______ from sc ,course where _______________ and cname='数据库基础') A: not exists;* ; course.cno=sc.cno and student.sno=sno B: not exists;sno ; course.cno=sc.cno and student.sno=sc.sno C: sno not in ; sno ; course.cno=sc.cno D: sno not in ; * ; course.cno=sc.cno and student.sno=sc.sno

    查询没有选数据库基础课程的同学学号和姓名。select sno,sname from student where ____________(select ______ from sc ,course where _______________ and cname='数据库基础') A: not exists;* ; course.cno=sc.cno and student.sno=sno B: not exists;sno ; course.cno=sc.cno and student.sno=sc.sno C: sno not in ; sno ; course.cno=sc.cno D: sno not in ; * ; course.cno=sc.cno and student.sno=sc.sno

  • 2022-06-09 问题

    设有关系S(SNO,SNAME,SEX) ,C(CNO,CNAME) ,SC(SNO,CNO) 。其中SNO为学号,SNAME为学生姓名,SEX为性别,CNO为课程号,CNAME为课程名。要查询选修“计算机”课的全体女学生姓名的SQL语句是SELECT sname FROM S,SC,C WHERE子句。这里WHERE子句的内容是 A: sno=sc.sno AND sex=′女′AND cname=′计算机′ B: sno=sc.sno AND c.cno=sc.cno AND cname=′计算机′ C: sex=′女′AND cname=′计算机′ D: sno=sc.sno AND c.cno=sc.cno AND sex=′女′AND cname=′计算机′

    设有关系S(SNO,SNAME,SEX) ,C(CNO,CNAME) ,SC(SNO,CNO) 。其中SNO为学号,SNAME为学生姓名,SEX为性别,CNO为课程号,CNAME为课程名。要查询选修“计算机”课的全体女学生姓名的SQL语句是SELECT sname FROM S,SC,C WHERE子句。这里WHERE子句的内容是 A: sno=sc.sno AND sex=′女′AND cname=′计算机′ B: sno=sc.sno AND c.cno=sc.cno AND cname=′计算机′ C: sex=′女′AND cname=′计算机′ D: sno=sc.sno AND c.cno=sc.cno AND sex=′女′AND cname=′计算机′

  • 2022-06-09 问题

    设有关系S(SNO,SNAME,SEX),C(CNO,CNAME),SC(SNO,CNO)。其中SNO为学号,SNAME为学生姓名,SEX为性别,CNO为课程号,CNAME为课程名。要查询选修“计算机”课的全体女学生姓名的SQL语句是SELECT sname FROM S,SC,C WHERE子句。这里WHERE子句的内容是 A: sno=sc.sno AND sex=‘女’AND cname=‘计算机’ B: sno=sc.sno AND c.cno=sc.cno AND cname=‘计算机’ C: Sex=‘女’AND cname=‘计算机’ D: sno=sc.sno AND c.cno=sc.cno AND sex=‘女’AND cname=‘计算机’

    设有关系S(SNO,SNAME,SEX),C(CNO,CNAME),SC(SNO,CNO)。其中SNO为学号,SNAME为学生姓名,SEX为性别,CNO为课程号,CNAME为课程名。要查询选修“计算机”课的全体女学生姓名的SQL语句是SELECT sname FROM S,SC,C WHERE子句。这里WHERE子句的内容是 A: sno=sc.sno AND sex=‘女’AND cname=‘计算机’ B: sno=sc.sno AND c.cno=sc.cno AND cname=‘计算机’ C: Sex=‘女’AND cname=‘计算机’ D: sno=sc.sno AND c.cno=sc.cno AND sex=‘女’AND cname=‘计算机’

  • 2022-10-26 问题

    下列SQL语句中,_____________可以在“学生-课程”数据库正确实现“查询选修2号课程且成绩在90分以上的所有学生的学号和姓名”。 A: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno ANDSC.Cno= ‘2’ AND SC.Grade > 90 B: SELECT Student.Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno ANDSC.Cno=‘2’AND SC.Grade > 90 C: SELECT Sno, Sname FROM Student, SC WHERE SC.Cno=‘2’AND SC.Grade > 90 D: SELECT Student.Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno AND SC.Grade > 90

    下列SQL语句中,_____________可以在“学生-课程”数据库正确实现“查询选修2号课程且成绩在90分以上的所有学生的学号和姓名”。 A: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno ANDSC.Cno= ‘2’ AND SC.Grade > 90 B: SELECT Student.Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno ANDSC.Cno=‘2’AND SC.Grade > 90 C: SELECT Sno, Sname FROM Student, SC WHERE SC.Cno=‘2’AND SC.Grade > 90 D: SELECT Student.Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno AND SC.Grade > 90

  • 2022-06-09 问题

    以下命令是相关子查询的嵌套查询是: 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: 以上都是

    以下命令是相关子查询的嵌套查询是: 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: 以上都是

  • 2022-10-29 问题

    针对数据库S_T,以下创建视图的命令不正确的是( )。 A: create view view1asselect sno,avg(grade)from scgroup by sno B: create view view2asselect sno,sname,sdeptfrom studentwhere sdept='CS' C: create view view3asselect sno,sage+20from studentwhere ssex='女' D: create view view4asselect student.sno,sname,sc.sno,cno,grade from sc,studentwhere sc.sno=student.sno and cno='1'

    针对数据库S_T,以下创建视图的命令不正确的是( )。 A: create view view1asselect sno,avg(grade)from scgroup by sno B: create view view2asselect sno,sname,sdeptfrom studentwhere sdept='CS' C: create view view3asselect sno,sage+20from studentwhere ssex='女' D: create view view4asselect student.sno,sname,sc.sno,cno,grade from sc,studentwhere sc.sno=student.sno and cno='1'

  • 2022-06-07 问题

    有关系S(SNO, SNAME, SAGE),C(CNO, CNAME),SC(SNO, CNO, GRADE)。其中SNO是学生号,SNAME是学生姓名,SAGE是学生年龄, CNO是课程号,CNAME是课程名称,GRADE是成绩。以下( )SQL语句可以实现查询选修了'C002'号课程的学生姓名。 A: SELECT SNAME FROM S, SC WHERE S.SNO=SC.SNO AND CNO='C002' B: SELECT SNAME FROM S WHERE SNO IN (SELECT SNO FROM SC WHERE CNO='C002') C: SELECT SNAME FROM S WHERE SNO = (SELECT SNO FROM SC WHERE CNO='C002') D: SELECT SNAME FROM S WHERE SNO NOT IN (SELECT SNO FROM SC WHERE CNO='C002')

    有关系S(SNO, SNAME, SAGE),C(CNO, CNAME),SC(SNO, CNO, GRADE)。其中SNO是学生号,SNAME是学生姓名,SAGE是学生年龄, CNO是课程号,CNAME是课程名称,GRADE是成绩。以下( )SQL语句可以实现查询选修了'C002'号课程的学生姓名。 A: SELECT SNAME FROM S, SC WHERE S.SNO=SC.SNO AND CNO='C002' B: SELECT SNAME FROM S WHERE SNO IN (SELECT SNO FROM SC WHERE CNO='C002') C: SELECT SNAME FROM S WHERE SNO = (SELECT SNO FROM SC WHERE CNO='C002') D: SELECT SNAME FROM S WHERE SNO NOT IN (SELECT SNO FROM SC WHERE CNO='C002')

  • 2022-06-19 问题

    下列查询语句中,错误的是()。 A: ASELECT Sno, COUNT(*) FROM SC GROUP BY Sno B: BSELECT Sno FROM SC GROUP BY Sno WHERE COUNT(*)> 3 C: CSELECT Sno FROM SC GROUP BY Sno HAVING COUNT(*)> 3 D: DSELECT Sno FROM SC GROUP BY Sno

    下列查询语句中,错误的是()。 A: ASELECT Sno, COUNT(*) FROM SC GROUP BY Sno B: BSELECT Sno FROM SC GROUP BY Sno WHERE COUNT(*)> 3 C: CSELECT Sno FROM SC GROUP BY Sno HAVING COUNT(*)> 3 D: DSELECT Sno FROM SC GROUP BY Sno

  • 1 2 3 4 5 6 7 8 9 10