Question: what is @@error in sql?
Answer: Remarks. Returns 0 if the previous Transact-SQL statement encountered no errors. Returns an error number if the previous statement encountered an error. If the error was one of the errors in the sys. messages catalog view, then @@ERROR contains the value from the sys.