SQL Error Codes
The following table describes error codes used by SQLException objects.
| This table also provides the SQLSTATE code that corresponds with each error type. The SQLSTATE is returned if using an ODBC/JDBC driver. |
| Error Code | SQLSTATE | Error Type | Description | Example |
|---|---|---|---|---|
-1 |
42000 |
|
There was a SQL syntax error. |
|
-2 |
0A000 |
|
The feature you tried to use is not yet implemented. |
- |
-3 |
58000 |
|
An internal database error occurred. |
- |
-4 |
42000 |
|
An error occurred during compilation of the SQL statement. |
|
-5 |
58000 |
|
An error occurred during execution of a SQL statement. |
|
-6 |
08000 |
|
Not used. |
- |
-7 |
08000 |
|
An error occurred during a network communication with the broker or Transaction Engine (TE). |
|
-8 |
22000 |
|
A conversion error occurred during execution of a SQL statement. |
|
-9 |
22000 |
|
A truncation error occurred during execution a SQL statement. |
|
-10 |
08000 |
|
An error related to a SQL connection occurred. The error might be related to an existing connection or to the creation of a SQL connection. |
|
-11 |
42000 |
|
A runtime error occurred during execution of a SQL DDL statement. |
|
-12 |
58000 |
|
An application-specific error occurred. |
|
-13 |
58000 |
|
A database security error occurred. |
|
-14 |
58000 |
|
Not used. |
- |
-15 |
58000 |
|
Not used. |
- |
-16 |
58000 |
|
Not used. |
- |
-17 |
58000 |
|
An internal error occurred. This should never happen. |
|
-18 |
58000 |
|
Not used. |
- |
-19 |
22000 |
|
Not used. |
- |
-20 |
22000 |
|
Not used. |
- |
-21 |
22000 |
|
Not used. |
- |
-22 |
58000 |
|
Not used. |
- |
-23 |
58000 |
|
Not used. |
- |
-24 |
40002 |
|
A server (TE) error occurred. |
|
-25 |
42000 |
|
There was an invalid table reference. |
|
-26 |
58000 |
|
Not used. |
- |
-27 |
23000 |
|
There was a server (TE) error related to duplicate values in a unique index. |
- |
-28 |
|
Not Used |
|
|
-29 |
40001 |
|
There was a server (TE) deadlock error. |
- |
-30 |
58000 |
|
Not used. |
- |
-31 |
58000 |
|
Not used. |
- |
-32 |
58000 |
|
Not used. |
- |
-36 |
58000 |
|
This is a generic error related to the server (TE). |
- |
-37 |
58000 |
|
No schema was specified where a schema specification was required. |
- |
-38 |
58000 |
|
A server (TE) error occurred. |
|
-39 |
58000 |
|
There was an attempt to write to a read-only connection. |
- |
-40 |
58000 |
|
Not used. |
- |
-41 |
58000 |
|
An error occurred that is related to the SQL |
- |
-42 |
58000 |
|
Not used. |
- |
-43 |
01000 |
|
The specified transaction isolation level is not supported. |
- |
-44 |
0A000 |
|
A string is not in UTF-8 when it should be. |
- |
-45 |
58000 |
|
A SQL constraint violation occurred. |
- |
-46 |
23001 |
|
There was an attempt to update a database object that cannot be updated. |
|
-47 |
58000 |
|
An error related to internationalization occurred. |
|
-48 |
58000 |
|
A SQL operation was killed, perhaps by the |
- |
-49 |
HY008 |
|
There was an invalid reference to a SQL statement. |
|
-50 |
58000 |
|
An error occurred because the database is shutting down. |
- |
-51 |
58000 |
|
An internal error was generated by the parser because the statement string ends with a quoted string. This error type is used by |
- |
-52 |
58000 |
|
This is a general error used for batch update exceptions. |
- |
-53 |
58000 |
|
An error related to Java stored procedures occurred. |
- |
-54 |
58000 |
|
There was a server (TE) error related to an attempt to set a value in an invalid field. |
- |
-55 |
58000 |
|
An invalid |
- |
-56 |
58000 |
|
There was an error related to an invalid operation. |
|
-57 |
58000 |
|
The index statistics for a specified query have become invalid. |
- |
-58 |
58000 |
|
In older versions of NuoDB, an invalid generator was defined. Invoke |
- |
-59 |
HYT00 |
|
Query timeout period expired before a statement object was executed. |
- |
-60 |
42S12 |
|
An invalid index reference has occurred. |
- |
-61 |
HY101 |
|
An invalid sequence reference has occurred. |
- |
-62 |
HY102 |
|
An error with the XA protocol has occurred. |
- |
-63 |
HYZZZ |
|
An unknown error code. |
- |
-64 |
40003 |
|
An error occurred acquiring a transactional lock |
- |
-65 |
08007 |
|
The transaction is in an unknown state. It is necessary to check whether the transaction has been committed. If not committed, re-commit the transaction. |
- |
-67 |
22032 |
|
An invalid argument was passed to a JSON string function. |
- |