Two columns of messages: errors SQL Server raises itself, 2714 and 515 at level 16 and 3701 at level 11, and errors you raise yourself with RAISERROR and THROW, 50000 and 50001 at level 16, plus a severity 10 note that is only a message

Raise Your Own Error in SQL Server: When Valid Code Breaks a Rule

Raise your own error in SQL Server when a valid statement breaks a rule you care about. This post shows three errors SQL Server raises itself, one error that depends on what exists in the database, and how RAISERROR and THROW turn an update of zero rows into a clear message. Every result comes from SQL Server 2025.

Read More