Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Sep410
Posting Yak Master
117 Posts |
Posted - 2008-08-19 : 17:09:02
|
| Hi all,I am working an application in vb.net.Users can insert new record to a tables. Primary key to that table is a Identity field. Is there any way I can get this Id as a return value of my insert?Sep |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
Sep410
Posting Yak Master
117 Posts |
Posted - 2008-08-19 : 17:38:39
|
| Thanks Tara.Sep |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-20 : 00:12:41
|
| Or you could even use IDENT_CURRENT('YourTableName') to get id generated for table explicitly. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-20 : 00:15:07
|
| refer below to understand the difference between themhttp://blog.sqlauthority.com/2007/03/25/sql-server-identity-vs-scope_identity-vs-ident_current-retrieve-last-inserted-identity-of-record/ |
 |
|
|
|
|
|