Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在每个表上创建一个触发器,以便在行更新时更新 DateModified 列。有没有办法在任何更新的表上创建一个更新 DateModified 的触发器?DateModified 和 DateCreated 在我的数据库中的任何一张表上。
谢谢!!
最简单的方法,无需手动查询元数据表:
EXEC sp_MSforeachtable 'CREATE TRIGGER ... ON ''?'' AFTER ...'