create table anothertable ( id int, b datetime) go create trigger test_trigger on yourtable after delete as begin insert anothertable select id,getdate() from deleted end go 删除完操作: select id from anothertable where b = (select max(b) from anothertable)得到ID
go
create trigger test_trigger on yourtable after delete
as
begin
insert anothertable select id,getdate() from deleted
end
go
删除完操作:
select id from anothertable where b = (select max(b) from anothertable)得到ID