查询“计算机类”图书相关销售明细(不含未售出图书)。
A. SELECT sale_item.*FROM sale_item ,booksWHERE sale_item.book_no =books.book_no ANDbook_type='计算机'
B. SELECT sale_item.*FROM sale_item inner join bookson sale_item.book_no =books.book_noWHERE book_type='计算机'
C. Select *from sale_itemWhere book_no in (Select book_nofrom booksWhere book_type='计算机')
D. Select *from sale_itemWhere exists (Select *from booksWhere books.book_no=sale_item.book_no and book_type='计算机')
建立计算所有学生(不含未选课学生)平均成绩的视图(包含学生学号,姓名,平均成绩)
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