触发器如何得到那些字段更改了

create trigger tr_process on 表
after insert,update
as
select name
from syscolumns
where id=object_id('表')
and (substring(columns_updated(),(colid-1)/8+1,1)
&power(2,(colid-1)%8))=power(2,(colid-1)%8)
order by colid
go

posted on 2009-07-23 17:58  martian6125  阅读(194)  评论(0编辑  收藏  举报