id , name , data , dt
1 A 0 2008-01-01
2 A 1 2008-01-02
3 A 2 2008-01-03
4 A 3 2008-01-04
5 A 4 2008-01-05
6 A 5 2008-01-06
.............................
i am sorry,i am using linux without chinese input methods now.
1-select * into anothertable from sourcetable where 1=2
2-alter table anothertable add times datetime
3-create trigger trgname on sourcetable
for delete,update
as
insert into anothertable select *,sysdate() from deleted --record the time that delete/delete source data and time
go
create trigger trgname1 on sourcetable
for insert
as
insert into anothertable select *,sysdate() from inserted --record the new data and operating time