/*使用数据库SC*/
USE SC
/*创建各视图*/
CREATE VIEW ies_student_view
AS
SELECT s_no,sname,sex,sbirthday,spname
FROM student,speciality
WHERE student.spno=speciality.spno AND
student.dno='510000';
SELECT *
FROM ies_student_view;
CREATE VIEW tcid1_student_view
AS
SELECT student.s_no,sname,spname,score
FROM student,speciality,student_course
WHERE tcid='1' AND
student.spno=speciality.spno AND
student.s_no=student_course.s_no;
SELECT *
FROM tcid1_student_view;
CREATE VIEW fail_student_view
AS
SELECT student.s_no,sname,tcid
FROM student,student_course
WHERE student.s_no=student_course.s_no AND
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载