RESIGNAL statement

Description

Resignals an exception condition.

Syntax

RESIGNALexception-name ]

Examples

Example 1

This code fragment returns all exceptions except for “Column Not Found” to the application:

...
DECLARE COLUMN_NOT_FOUND EXCEPTION 
	FOR SQLSTATE '52003';
...
EXCEPTION
WHEN COLUMN_NOT_FOUND THEN
SET message='Column not found' ;
WHEN OTHERS THEN
RESIGNAL ;

Usage

Within an exception handler, RESIGNAL lets you quit the compound statement with the exception still active, or to quit reporting another named exception. The exception is handled by another exception handler or returned to the application. Any actions by the exception handler before the RESIGNAL are undone.


Side effects

None

Standards

Permissions

None

See also

BEGIN … END statement

SIGNAL statement