在“学生选课”数据库中的两个关系如下:S(SNO,SNAME,SEX,AGE),SC(SNO,CNO,GRADE)则与SQL命令“SELECTSNAMEFROMS,SCWHERES.SNO=SC.SNOANDGRADE<60)”等价的关系代数表达式是________。 A: πSname((σgrade<60(SC))∞S) B: πSno((σgrade<60(SC))∞S) C: (σgrade<60(SC))∞πSname(S)) D: πSname((σgrade<60(S))∞SC)
在“学生选课”数据库中的两个关系如下:S(SNO,SNAME,SEX,AGE),SC(SNO,CNO,GRADE)则与SQL命令“SELECTSNAMEFROMS,SCWHERES.SNO=SC.SNOANDGRADE<60)”等价的关系代数表达式是________。 A: πSname((σgrade<60(SC))∞S) B: πSno((σgrade<60(SC))∞S) C: (σgrade<60(SC))∞πSname(S)) D: πSname((σgrade<60(S))∞SC)
删除触发器tri—Sno的正确命令是——。 A: REMOVETRIGGERtri—Sno B: DROPTRIGGERtri—Sno C: TRUNCATEFRIGGERtri—Sno D: DELETETRIGGERtri—Sno
删除触发器tri—Sno的正确命令是——。 A: REMOVETRIGGERtri—Sno B: DROPTRIGGERtri—Sno C: TRUNCATEFRIGGERtri—Sno D: DELETETRIGGERtri—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
下列查询语句中,错误的是()。 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: SELECT Sno, COUNT(*) FROM SC GROUP BY Sno B: SELECT Sno FROM SC GROUP BY Sno WHERE COUNT(*)> 3 C: SELECT Sno FROM SC GROUP BY Sno HAVING COUNT(*)> 3 D: SELECT Sno FROM SC GROUP BY Sno
下列查询语句中,错误的是()。 A: SELECT Sno, COUNT(*) FROM SC GROUP BY Sno B: SELECT Sno FROM SC GROUP BY Sno WHERE COUNT(*)> 3 C: SELECT Sno FROM SC GROUP BY Sno HAVING COUNT(*)> 3 D: SELECT Sno FROM SC GROUP BY Sno
查询选课门数大于3门的同学学号,姓名, 选课门数Select ______________from student s, scwhere s.sno=sc.sno group by __________having _____________ A: sno, sname, count(*) ; sno, sname; count(*)>3 B: sno, sname, count(*) ; sno; count(*)>3 C: sno, sname, count(cno) ; sno; count(cno)>3 D: sno, sname, count(sno) ; sno; count(sno)>3
查询选课门数大于3门的同学学号,姓名, 选课门数Select ______________from student s, scwhere s.sno=sc.sno group by __________having _____________ A: sno, sname, count(*) ; sno, sname; count(*)>3 B: sno, sname, count(*) ; sno; count(*)>3 C: sno, sname, count(cno) ; sno; count(cno)>3 D: sno, sname, count(sno) ; sno; count(sno)>3
下列SQL语句中,_________可以在“学生-课程”数据库正确实现“将学生的学号及他的平均成绩定义为一个视图”。 A: CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; B: CREAT VIEW S_G(Sno,AVG(Grade)) AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; C: CREAT VIEW S_G AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; D: CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SCORDER BY Sno;
下列SQL语句中,_________可以在“学生-课程”数据库正确实现“将学生的学号及他的平均成绩定义为一个视图”。 A: CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; B: CREAT VIEW S_G(Sno,AVG(Grade)) AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; C: CREAT VIEW S_G AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; D: CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SCORDER BY Sno;
下列 SQL 语句select * from student where sno = '05880101'union select * from student where sno = '05880102'与此查询语句等价的选项是( )。 A: select * from student where sno= '05880101' and sno= '05880102' B: select * from student where sno= '05880101' or sno= '05880102' C: select * from student where sno= '05880101' D: select * from student where sno= '05880102'
下列 SQL 语句select * from student where sno = '05880101'union select * from student where sno = '05880102'与此查询语句等价的选项是( )。 A: select * from student where sno= '05880101' and sno= '05880102' B: select * from student where sno= '05880101' or sno= '05880102' C: select * from student where sno= '05880101' D: select * from student where sno= '05880102'
统计每门课程的选课人数select cno , _________from scgroup by ________ A: count(*) ; cno B: count(sno) ; cno C: count(*) ; sno D: count(sno) ; sno
统计每门课程的选课人数select cno , _________from scgroup by ________ A: count(*) ; cno B: count(sno) ; cno C: count(*) ; sno D: count(sno) ; sno
若要求“查询选修了3门以上课程的学生的学号”,正确的SQL语句是( ) A: SELECT sNo FROM SC GROUP BY sNo WHERE COUNT(*)> 3 B: SELECT sNo FROM SC GROUP BY sNo HAVING COUNT(*)> 3 C: SELECT sNo FROM SC ORDER BY sNo WHERE COUNT(*)> 3 D: SELECT sNo FROM SC ORDER BY sNo HAVING COUNT(*)> 3
若要求“查询选修了3门以上课程的学生的学号”,正确的SQL语句是( ) A: SELECT sNo FROM SC GROUP BY sNo WHERE COUNT(*)> 3 B: SELECT sNo FROM SC GROUP BY sNo HAVING COUNT(*)> 3 C: SELECT sNo FROM SC ORDER BY sNo WHERE COUNT(*)> 3 D: SELECT sNo FROM SC ORDER BY sNo HAVING COUNT(*)> 3
在学生选课数据库中,查询平均成绩大于等于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;
在学生选课数据库中,查询平均成绩大于等于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;