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.
SELECT * FROM SYSCS_DIAG.ERROR_MESSAGES
All users can access this diagnostic table, whether or not the database has authentication and SQL authorization enabled.
The table has the columns shown in the following 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()). |