Return to Snippet

Revision: 45052
at April 22, 2011 23:43 by kashif21


Initial Code
CREATE TRIGGER [dbo].[TriggerName] ON [dbo].[TableName]  FOR UPDATE AS


// declare id variable first;

DECLARE @ID int

//set it in the begin section. 
BEGIN

	SET @ID = (SELECT IssueID FROM inserted)
END

*inserted is table from where we are querying the last updated id.

Initial URL


Initial Description


Initial Title
How to get recent updated record Id in the triggers

Initial Tags


Initial Language
SQL