Name

RAISE — Indicate an error condition

Syntax

image with no caption

Description

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.

See Also

CREATE TRIGGER [SQL Cmd, Ap C]

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.