The RAISE
expression isn’t an expression in the
traditional sense. Rather than producing a value, it provides a
means to raise an error exception. The RAISE
expression can only be used in the body
of a trigger. It is typically used to flag a constraint
violation, or some similar problem. It is common to use a
RAISE
expression in
conjunction with a CASE
expression, or some other expression that selectively executes
subexpressions depending on the logic of the SQL
statement.