How do you use RAISERROR to raise a user-defined error message with a specific severity level?

Responsive Ad Header

Question

Grade: Education Subject: Support
How do you use RAISERROR to raise a user-defined error message with a specific severity level?
Asked by:
94 Viewed 94 Answers

Answer (94)

Best Answer
(281)
You can raise a user-defined error message using `RAISERROR ( 'Your custom message', 16, 1 )`. The `16` represents the severity level (typically used for errors that can be corrected by the user), and `1` is the state. You can replace 'Your custom message' with the desired text.