What is @@ERROR Variable in SQL SERVER?

What is @@ERROR Variable in SQL SERVER?
Why it is used in SQL Server stored Procedures?

Tags..  SQL Server  DBA  Asp.Net Interview  Database
Views: 294 | Community Opinion/Answer: 1

Add Your Opinion

Bookmark this page..



Ask a New Question Go to Home


Community Opinion/Answers
Rita Sahnu said..

The @@ERROR automatic variable in SQL SERVER returns the error code of the last Transact-SQL statement. If there was no error, @@ERROR returns zero. Because @@ERROR is reset after each Transact-SQL statement, it must be saved to a variable if it is needed to process it further after checking it.


What do you think? Add your opinion/answer
Your Name:
*your opinion/answer: