Description

label
Specifies the label for the RESIGNAL statement. The label name cannot be the same as the routine name or another label within the same scope. For more information, see Handling errors and warnings.
SQLSTATE VALUE
Specifies the SQLSTATE that will be signalled. The specified value must follow the rules for SQLSTATEs:

If the SQLSTATE does not conform to these rules, an error is returned.

sqlstate-string-constant
The sqlstate-string-constant must be a character string constant with exactly 5 characters.
sqlstate-string-variable
The sqlstate-string-variable must be a character or Unicode graphic variable. The actual length of the contents of the sqlstate-string-variable must be 5.
condition-name
Specifies the name of the condition that will be returned. The condition-name must be declared within the compound statement.
SET
Introduces the assignment of values to condition-information-items. The condition-information-item values can be accessed using the GET DIAGNOSTICS statement. The only condition-information-item that can be accessed in the SQLCA is MESSAGE_TEXT.
MESSAGE_TEXT
Specifies a string that describes the error or warning.

If an SQLCA is used,

  • the string is returned in the SQLERRMC field of the SQLCA
  • if the actual length of the string is longer than 70 bytes, it is truncated without a warning.
CONSTRAINT_CATALOG
Specifies a string that indicates the name of the database that contains a constraint related to the signalled error or warning.
CONSTRAINT_SCHEMA
Specifies a string that indicates the name of the schema that contains a constraint related to the signalled error or warning.
CONSTRAINT_NAME
Specifies a string that indicates the name of a constraint related to the signalled error or warning.
CATALOG_NAME
Specifies a string that indicates the name of the database that contains a table or view related to the signalled error or warning.
SCHEMA_NAME
Specifies a string that indicates the name of the schema that contains a table or view related to the signalled error or warning.
TABLE_NAME
Specifies a string that indicates the name of a table or view related to the signalled error or warning.
COLUMN_NAME
Specifies a string that indicates the name of a column in the table or view related to the signalled error or warning.
CURSOR_NAME
Specifies a string that indicates the name of a cursor related to the signalled error or warning.
CLASS_ORIGIN
Specifies a string that indicates the origin of the SQLSTATE class related to the signalled error or warning.
SUBCLASS_ORIGIN
Specifies a string that indicates the origin of the SQLSTATE subclass related to the signalled error or warning.
SQL-variable-name
Identifies an SQL variable declared within the compound-statement, that contains the value to be assigned to the condition-information-item. The SQL variable must be defined as CHAR, VARCHAR, Unicode GRAPHIC, or Unicode VARGRAPHIC variable.
SQL-parameter-name
Identifies an SQL parameter declared within the compound-statement, that contains the value to be assigned to the condition-information-item. The SQL parameter must be defined as CHAR, VARCHAR, Unicode GRAPHIC, or Unicode VARGRAPHIC variable.
diagnostic-string-constant
Specifies a character string constant that contains the value to be assigned to the condition-information-item.