• Chirag (9/3/2009)


    I found the question confusing. It asks for value of @@Error which is 15248. I put the statement in a TRY/CATCH and got the @@Error as 15248.

    The question is "What is the value of @@Error after executing this statement:".

    A TRY/CATCH will catch errors which happen during execution.

    If you run this code:

    EXECUTE sp_rename N'fakename', N'fakename2', 'OBJECT'

    SELECT @@Error

    you will see the error 15248 message, but @@Error will be 0.