Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi

i want have an reference no after an immeadiate insert statement
for example


1, manu ,janu,.... record inserted

from this record i want an immeadiate reference no means here iwant 1 in the above record
Posted
Comments
thatraja 12-Sep-13 7:09am    
Not clear, Rephrase your question please for quick response.

1 solution

I believe you mean the identity value that was generated as a result of the insert statement.

In SQL you do:
SQL
SELECT SCOPE_IDENTITY() AS NewID
 
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