@@ERROR as one of the basic error handling mechanisms in SQL Server. @@ERROR is a Global Variable in SQL Server. This variable automatically populates the error message when a certain error occurred in any statement. But we have to trace it within just after the next line where the actual error occurred, otherwise, it will reset to 0.
Visit Our New Site for HR Interview Questions Answers http://www.interviewboat.com/Company/GetCompanySponsored Ads