日期:2014-05-17 浏览次数:20697 次
if(select 1 from sys.objects where name='abc') is not null
drop table abc
go
create table abc(a int)
go
insert into abc select 1
go
create trigger abcd
on abc
after update
as
declare @a int
declare @b int
select @a=a from inserted
select @b=A from deleted
update abc set a=@a+@b
go
/*上面的语句执行一次即可*/
update abc set a=2
select * from abc