How to Get the last identity value used
Answers were Sorted based on User's Feedback
Answer / guest
the last identity value used in an insert can be retrieved
with the @@identity function.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / chandramohan
scope_identity() would be the currect answer. To avoid potential problems professionals suggests this method since it returns the recently added value.
Is This Answer Correct ? | 1 Yes | 1 No |
How do use Having,Group by,Group function in SQL?
Diffrences between sql server 2000 vs 2008
What is sub query and its properties?
What is lock escalation?
Explain cdc and sql injection?
How to update existing rows in a table?
How to check what was the last restore transaction LSN on Log-Shipping and Mirroring when we doesn't have a Monitor server and Witness server?
How you can add messages to the nt event log from within a stored procedure?
How many .ndf files can we create in Sql server 2005?
How many full-text indexes can a table have?
What is difference between delete & truncate commands?
What is difference between cte and view?