Error (−) SQL codes
SQL return codes that are preceded by a minus sign (−) indicate that the SQL statement execution was unsuccessful.
SQLCODE values
The SQLCODE value is set by Db2 after each statement is executed, as shown in the following table.
SQLCODE value | Meaning | SQLCODE descriptions |
---|---|---|
SQLCODE = 0 | Successful execution, if SQLWARN0 is blank. If SQLWARN0 = 'W', successful execution with warning. |
000 |
SQLCODE = 100 | No data was found. For example, a FETCH statement returned no data because the cursor was positioned after the last row of the result table. | +100 |
SQLCODE > 0 and not = 100 | Successful execution with a warning. | +sqlcode-num |
SQLCODE < 0 | Execution was not successful. | -sqlcode-num |
For PDF format descriptions of the SQL codes that Db2 13 might issue, see Codes.
SQL error codes for Java programs
For information on SQL error codes in the range -4200 to -4299 and -4450 to -4499, see Error codes issued by the IBM Data Server Driver for JDBC and SQLJ.
List of error SQL codes
The following SQL codes indicate unsuccessful execution of the SQL statement.