Home > Interview Questions > SQL Server > What is the use of @@ERROR in SQL SERVER?

What is the use of @@ERROR in SQL SERVER?

by Narain Siddharth   on 28/02/2011   Category: SQL Server   |  Level: Beginner   |  Views: 1431    |  Points: 25     |  Silver 

In SQL server, @@ERROR is a global variable and returns the error number when a error occurred in last transact SQL statement. If a SQL statement executed successfully @@Error is assigned to 0, suppose if last transact SQL statement executed with error, @@Error is set to the error number.

« What is managed code and unmanaged in .NET?
» What is event bubbling in ASP.NET?
Post Question  |  Question Home

Recent Posts

User Responses

No response found, be the first to review this question.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts