---视图就是一个虚表
if exists(select * from sysobjects where name='view_student')
drop view view_student
go
create view view_student
as select
姓名=stuName,学号=stuInfo.stuNo,笔试成绩=writtenExam,机试成绩=labExam,平均分=(writtenExam+labExam)/2
from stuinfo left join stumarks on stuinfo.stuno=stumarks.stuno
go
select * from view_student
go