SQL_server 触发器,在有插入操作时修改同一个表里的字段
SQL_server 触发器,在有插入操作时修改同一个表里的字段
日期:2015-07-16 15:48:48 人气:1
CREATE TRIGGER dbo.testTrigger
ON dbo.A
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
update a
set f=null
where A.a=(select a from inserted) --决定需要更新的行
END