TABLE 1 Possible Values of @@ERROR
Condition Result
Statement executed @@ERROR = 0without error
Error occurred @@ERROR = T-SQL error number
Raiserror executed @@ERROR = raiserror error num (default = 50000)