Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

SQL Server $$Identity

I've noticed at times that using

set @VariablenID = SCOPE_IDENTITY()  will work when

set @PaymentTransactionID = @@Identity can give me problems and bomb out in my .Net web pages on the output.

Is one better than the other and what's the difference?
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Larry Brister

ASKER

aneeshattingal:

I'm going to accept the answer above...seen your replies for years on EE and trust you...

Now...big question...
You have a link that explains "Scopes" so I can ubderstand what you just said?  ;)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfeect...as always