首页 > 编程学习 > 触发器如何得到那些字段更改了

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

发布时间:2022/5/14 18:48:57

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

Copyright © 2010-2022 ngui.cc 版权所有 |关于我们| 联系方式| 豫B2-20100000