create trigger 名 on table1
for update
as
update a set a.f1 = b.f1,a.f2 = b.f2...
from tablehistory a
join inserted b on a.主键 = b.主键
for update
as
update a set a.f1 = b.f1,a.f2 = b.f2...
from tablehistory a
join inserted b on a.主键 = b.主键
create trigger 名 on table1
for update
as
insert tablehistory select * from inserted
for update
as
insert tablehistory select * from deleted
for update
as
insert tablehistory select * from inserted