视图
即虚拟表
系统-右键-新建视图
编辑前200行
select *from studentscore
代码创建法:
create view studentscore
as
select student.sno,sname,ssex,sbirthday,class,cno,degree from student
join score on student.Sno=score.sno
删除视图:
drop view studentscore
修改视图:
alter view cts
as
select student.sno,score.cno,sname,sbirthday,class,cname,tno,degree from student,course,score
where score.Cno=course.Cno and score.sno=student.Sno
Notice:
1、一个视图不能引用另一视图(不能用join链接)
2、order by前面必须写上top
时间: 2024-11-03 05:43:05