SQLServer2005 高校教学内容 (SQL 基础 - 视图)

2017-04-09 12:03

创建视图

create view IS_Student(sno,sname,grade)
as
    select student.sno,sname,grade
    from student,sc
    where student.sno = sc.sno
        and sdept = 'IS' 
        and cno = '2' 
with check option

删除视图

drop view IS_student

视图之间的相互索引

create view IS_s1(sname,grade)
as 
select sno,grade
from IS_student
where grade > 90