本文介绍了触发审计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我需要在同一记录中更改列值的审计触发器 触发触发器。 我需要怎么做.. 谢谢.. 解决方案 我不确定我到底知道你需要什么,但也许是这样的? 创建触发器MyTrigger on MyTable 更新后 as 开始 如果@@ rowcount = 0 返回 更新MyTable set UpdatedTime = getdate(),UpdatedBy = suser _sname() 来自MyTable t 加入插入i on t.PrimaryKeyColumn = i.PrimaryKeyColumn end go Simon 鉴于BEFORE触发器已经存在于其他RDBMS产品系列中近乎20年,它们肯定会很好的解决它: 也许在期间当前的十年。然后也许他们可以开始考虑产品中还缺少的其他基本功能。 - Daniel Morgan da ****** @ x.washington.edu (将''x''替换为''u''来回复) I need audit triggers that change columns value in the same recordthat fire trigger.I need how to do..Thanks.. 解决方案I''m not sure I understand exactly what you need, but perhaps something like this?create trigger MyTriggeron MyTableafter updateasbeginif @@rowcount = 0returnupdate MyTableset UpdatedTime = getdate(), UpdatedBy = suser_sname()from MyTable tjoin inserted ion t.PrimaryKeyColumn = i.PrimaryKeyColumnendgoSimonGiven that BEFORE triggers have existed in other RDBMS product lines foralmost 20 years it certainly would be nice of them to get around to it:Maybe during the current decade. Then perhaps they can startcontemplating the other basic functionality that is still missing fromthe product.--Daniel Morgan da******@x.washington.edu(replace ''x'' with a ''u'' to reply) 这篇关于触发审计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-05 21:52