SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-222
SIGNAL SQLSTATE Statement
SIGNAL SQLSTATE Statement
The SIGNAL statement is used with triggers. It allows a trigger execution to raise an
exception that causes both the triggered and triggering statements to fail.
The SIGNAL statement sends an SQLSTATE and error text.
quoted_sqlstate
is the five-digit SQLSTATE to be passed to SIGNAL.
quoted_string_expr
is a string expression.
Considerations for SIGNAL SQLSTATE
You can use the GET DIAGNOSTICS command to retrieve quoted_string_expr
(as message_text) and quoted_sqlstate.
SIGNAL SQLSTATE quoted_sqlstate (quoted_string_expr);