GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TRIGGER dbo.table_update_trigger
ON dbo.table
FOR update
AS
BEGIN
SET NOCOUNT ON;
DECLARE @newvalue NVARCHAR(100), @id INT
SELECT @newvalue = newvalue FROM INSERTED
SELECT @id = id FROM DELETED
UPDATGE table SET updTime = GETDATE() WHERE id = @id
END
GO
No comments:
Post a Comment