视图--虚拟表(影子):原表映照出的虚拟表,语句如下:
create view vw_studentScore
as
select stuName, claName, stuSubjectName, stuScore from studentScore
inner join stuClass on stuClass = claID
inner join studentSubject on stuSubject =subID
select * from vw_studentScore
_________________________________________________
注释符号:
1.——
2./**/
_________
触发器 有下面三种形式:
1.insert
2.update
3.delect
________
创建触发器,如同建立一个按钮,只要涉及到这个按钮,事先编好的按钮中的内容会自动出现。如:
create trigger tri_studentScore
on studentScore--(在哪个表创建)
for insert--创建insert类型
as
select * from studentScore
insert into studentScore(stuName,stuClass,stuSubject,stuScore,insertDatetime)
values('adfasd',2,4,60,getdate())
______________________________
阅读(1097) | 评论(0) | 转发(0) |