Dofactory.com
Dofactory.com
 Back to list
Views:   5.4K
Replies:  2
Archived

Retrieve Primary Key Value

How do I insert a new record and then retrieve the primary key value?
Chuks Enedeh, May 11, 2015
Reply 1
Chuks: 

In SQL Server issue SELECT SCOPE_IDENTITY() following the INSERT statement.
This will return the newly created Identity primary key. 

Hope this helps.
Jack
Jack Poorte, Jul 16, 2015
Reply 2
You query is open ended. So difficult to get.
Alok Saxena, Jun 25, 2015
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.