Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » SQL statements » Alphabetical list of SQL statements

RESIGNAL statement [SP]

Resignals an exception condition.

Syntax
RESIGNAL [ exception-name ]
Remarks

Within an exception handler, RESIGNAL allows you to 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.

Privileges

None.

Side effects

None.

Standards
  • ANSI/ISO SQL Standard

    The RESIGNAL statement is part of optional ANSI/ISO SQL Language Feature P002, "Computational completeness".

  • Transact-SQL

    The RESIGNAL statement cannot be used in Transact-SQL compound statements and procedures.

Example

The example fragment returns all exceptions except SQLSTATE 52003 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;