Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How will you get the just inserted row Primary Key.?
Posted

Have a look at SCOPE_IDENTITY()[^]

Read to the bottom how SCOPE_IDENTITY and @@IDENTITY differ
 
Share this answer
 
Comments
Timberbird 8-Nov-11 8:23am    
My mistake, SCOPE_IDENTITY() does suit OP purpose better
Try selecting @@IDENTITY[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900