About
Pricing
Community
Teams
Start Free Trial
Log in
HLRosenberger
asked on
1/4/2013
returning primary key after update
I use this appended to an INSERT statement (using Dim PK as long = Command.ExecuteScalar() ) to return the primary key:
SELECT @@Identity
How do I do the same for an UPDATE? I am geting a NULL back.
Microsoft SQL Server
Microsoft SQL Server 2008
SQL
2
1
Last Comment
HLRosenberger
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Steve Wales
1/4/2013
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
HLRosenberger
1/4/2013
ASKER
I understand Thanks!
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23