SYSCS_DIAG.ERROR_MESSAGES diagnostic table

The SYSCS_DIAG.ERROR_MESSAGES diagnostic table shows all of the SQLStates, locale-sensitive error messages, and exception severities for a Derby database.

You can reference the SYSCS_DIAG.ERROR_MESSAGES diagnostic table directly in a statement. For example:
SELECT * FROM SYSCS_DIAG.ERROR_MESSAGES

All users can access this diagnostic table, whether or not the database has authentication and SQL authorization enabled. See "Configuring user authentication" and "Configuring user authorization" in the Derby Security Guide for more information.

The table has the columns shown in the following table.

Table 1. Columns in the SYSCS_DIAG.ERROR_MESSAGES table
Column Name Type Length Nullable Contents
SQL_STATE VARCHAR 5 true The SQLState of the SQLException (that is, the value returned by SQLException.getSQLState()).
MESSAGE VARCHAR 32672 true The error message (that is, the value returned by SQLException.getMessage()).
SEVERITY INTEGER 10 true The Derby code for the severity (that is, the value returned by SQLException.getErrorCode()).
Related reference
SYSCS_DIAG.CONTAINED_ROLES diagnostic table function
SYSCS_DIAG.ERROR_LOG_READER diagnostic table function
SYSCS_DIAG.LOCK_TABLE diagnostic table
SYSCS_DIAG.SPACE_TABLE diagnostic table function
SYSCS_DIAG.STATEMENT_CACHE diagnostic table
SYSCS_DIAG.STATEMENT_DURATION diagnostic table function
SYSCS_DIAG.TRANSACTION_TABLE diagnostic table