How to get @ and @ at the same time?

If @ is checked after Error checking statement then it will have 0 as the value of @ as it would have been reset.
And if @ is checked before the error-checking statement then @ would get reset. To get @ and @ at the same time do both in same statement and store them in local variable.

SELECT @RC = @, @ER = @

Author:

Since March 2011, have 8+ years of professional experience on software development, currently working as Senior Software Engineer at s3 Innovate Pte Ltd.

Leave a Reply