Raise statement

A RAISE statement is used to raise an exception or warning. When raising an exception, this statement will also roll back the current transaction, if one exists.

Usage
RAISE [SQLWARNING] exception;

Where exception may be a variable reference to an exception or an exception expression.

Syntax rules
  • If SQLWARNING is specified, the exception will be sent to the client as a warning and the procedure will continue to execute.

  • A null warning will be ignored. A null non-warning exception will still cause an exception to be raised.

Example raise statement
RAISE SQLWARNING SQLEXCEPTION 'invalid' SQLSTATE '05000';

results matching ""

    No results matching ""