【2018-01-19】Sql Server-视图,事务
时间:2021-07-01 10:21:17
帮助过:4人阅读
--视图增删改操作不影响基础表
----视图不允许出现重复列
create view haha
--创建视图
as
select student.
*,Score.Cno,Score.Degree
from student,score
where student.Sno
=Score.Sno
select * from haha
----事务
begin tran
insert into users
values(
‘赵四‘,
‘c002‘)
insert into users
values(
‘赵五‘,
‘c001‘)
if @@error>0
begin
rollback tran;
end
begin
commit tran;
end
select * from users;
【2018-01-19】Sql Server-视图,事务
标签:bsp span end pre 出现 rom 事务 user begin