Posted By

rengber on 08/07/07


Tagged

database tsql trigger Technique


Versions (?)

Update Trigger to Increment a Version Number Column


 / Published in: SQL
 

  1. CREATE TRIGGER [RobTestTrigger] ON [dbo].[RobTestTable]
  2. FOR UPDATE
  3. AS
  4. UPDATE t
  5. SET t.Version = t.Version + 1
  6. FROM RobTestTable t
  7. JOIN inserted i ON i.Id = t.ID

Report this snippet  

You need to login to post a comment.