CREATE VIEW IS_Student ASSELECT Sno,Sname,Sage FROM StudentWHERE Sdept= 'IS'WITH CHECK OPTION关于该语句,正确的说法有()
A. 建立信息系学生的视图
B. 建立该视图后,对该视图进行的修改、插入、更新操作只涉及信息系学生
C. IS_Student视图包含Sno,Sname,Sage三个属性。
D. 该语句不对,CREATE VIEW IS_Student AS 应该为CREATE VIEW IS_Student(Sno,Sname,Sage)AS
查看答案
CREATE VIEW F_Student1(stdnum,name,sex,age,dept)AS SELECT * FROM Student WHERE Ssex=‘女’关于此语句,正确的说法有()
A. 该语句是错误的
B. 该语句是正确的,但某种情况下可能会存在问题
C. F_Student1视图的属性列与student表的属性列一一对应,修改基表Student的结构后(如增加属性列),Student表与F_Student1视图的映象关系被破坏,导致该视图不能正确工作
D. 该语句表示将Student表中所有女生记录定义为一个视图
建立信息系选修了1号课程的学生视图,正确的SQL语句为()
A. CREATE VIEW IS_S1 ASSELECT Student.Sno,Sname,Grade FROM Student,SCWHERE Sdept= 'IS' AND Student.Sno=SC.Sno AND SC.Cno= '1';
B. CREATE VIEW IS_S1 (Sno,Sname,Grade) ASSELECT Student.Sno,Sname,Grade FROM Student,SCWHERE Sdept= 'IS' AND SC.Cno= '1';
CREATE VIEW IS_S1 (Sno,Sname,Grade) ASSELECT Student.Sno,Sname,GradeFROM Student,SC WHERE Sdept= 'IS' ANDStudent.Sno=SC.Sno AND SC.Cno= '1'
将学生的学号及他的平均成绩定义为一个视图,正确的SQL语句为()
A. CREATE VIEW S_G AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno;
B. CREATE VIEW S_G(Sno,Gavg) ASSELECT Sno,AVG(Grade) FROM SCGROUP BY Sno;
CREATE VIEW S_G(Sno,Gavg) ASSELECT Sno,AVG(Grade) FROM SCGROUP BY Cno;
DROP VIEW <视图名>[CASCADE];该语句表示从数据字典中删除指定的视图定义,如果该视图还导出其他视图,若使用CASCADE,则把该视图及由它导出的视图一起删除。
A. 对
B. 错