I am new to using triggers, so I wanted to make sure this made sense before I made this live.
I want a field on my table to be updated with the current date every time the record is updated.
I created the following trigger on the table...
I am using SQL Server 2000 and have recursive triggers turned off. Do you see any major flaws with the way I am doing this?Code:CREATE TRIGGER testUpdate ON [dbo].[testTable] FOR UPDATE AS UPDATE [dbo].[testTable] SET [dbo].[testTable].[updateMe] = getdate() FROM inserted i WHERE [testTable].[pkTest] = i.[pkTest]
Thanks,
AndyL




Reply With Quote