I have an sp in SQL Server that when errors returns -4
What does -4 mean? Is there a table somewhere explaining what the possible return values are?
Th
If you have a RETURN statement with an explicit return value, that is of course the return value.
But if there is no RETURN statement, but an error occurs during execution, the return value is 10 minus the severity level of the error. Division by zero is level 16, thus the return value is -6. Permissions errors are typical level 14, thus the return value is -4.
As you may guess this is not terribly useful, but this: 0 is success, and everything else is an error.