Identity after updated
-
Hi, I fixed an after update trigger with a table in Sql server 2005 and i want to get the last Identity updated in the this table to inserted in another table. How can i get the last updated Identity in a table? Please help Thank you Sms
Do you mean that you have an Identity column in your table and, following an update, you want to find out he value in this field for the records that were updated? If so, you should look at the values in this field for the rows in the inserted entity in your trigger implementation.
Paul Marfleet
-
Hi, I fixed an after update trigger with a table in Sql server 2005 and i want to get the last Identity updated in the this table to inserted in another table. How can i get the last updated Identity in a table? Please help Thank you Sms
If you need the identity of the inserted record in the main table, use the
scope_identity()
function to retrieve the data.Deja View - the feeling that you've seen this post before.