日期:2014-05-17 浏览次数:20629 次
if OBJECT_ID('Name','u') is not null
drop table Name
create table Name
(
ID int,
Name varchar(20),
)
go
insert into Name
select 1,'name1' union all
select 2,'name2'
if OBJECT_ID('AmendName','u') is not null
drop table AmendName
create table AmendName
(
ID int,
Name varchar(20),
)
go
if OBJECT_ID('UpdateTri','tr') is not null
drop trigger UpdateTri
go
create trigger UpdateTri on Name
for update
as
insert into AmendName select *From inserted
go