题目内容

建立计算所有学生(不含未选课学生)平均成绩的视图(包含学生学号,姓名,平均成绩)

A. CREATE VIEW AVGGradeView(Sno,sname,AVGGrade)ASSELECT student.sno,sname,avg(grade)FROM student,scWHERE student.sno=sc.snoGROUP BY student.sno,sname
B. CREATE VIEW AVGGradeViewASSELECT student.sno,sname,avg(grade) avg_gradeFROM student,scWHERE student.sno=sc.snoGROUP BY student.sno,sname
CREATE VIEW AVGGradeViewASSELECT student.sno,sc.sno,sname,avg(grade) avg_gradeFROM student,scWHERE student.sno=sc.snoGROUP BY student.sno,sname
D. CREATEVIEWAVGGradeViewASSELECTstudent.sno,sname,avg(grade)avg_gradeFROMstudent,scWHEREstudent.sno=sc.snoGROUPBYstudent.sno

查看答案
更多问题

视图的作用包括()

A. 能够简化用户的操作
B. 使用户能以多种角度看待同一数据
C. 增强数据安全性
D. 提高数据的逻辑独立性

查询每位学生及他的选课信息,要求查询出(sno,sname,cno,grade)。(含末选课的学生)

A. select student.sno, sname, cno, gradefrom student , scwhere student.sno=sc.sno
B. select student.sno, sname, cno, gradefrom student left join sc on student.sno=sc.sno
C. select student.sno, sname, cno, gradefrom sc right join student on student.sno=sc.sno
D. select student.sno, sname, cno, gradefrom student join sc on student.sno=sc.sno

订单表orders和订单明细表orderdetails表之间有关联,一张订单中可能有多个订单明细,订单明细表的外键order_no要参照订单表的主键order_no。为保证数据的完整性,以下描述正确的是()。

A. 插入记录时,要先向orders表中插入一条订单,再向orderdetails表中插入该订单下的所有明细记录
B. 删除记录时,要先在orderdetails表中删除某个订单下的所有明细记录,再从orders表中删除该订单。
C. 插入订单和订单明细的顺序无所谓
D. 删除订单和订单明细的顺序无所谓

查询没有选修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' )

答案查题题库