SQL error codes
SQL return codes that are preceded by a minus sign (-) indicate that the SQL statement execution was unsuccessful.
Db2 sets the SQLCODE after each SQL statement is executed as follows:
- If SQLCODE = 0, execution was successful.
- If 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.
- If SQLCODE > 0 and not = 100, execution was successful with a warning.
- If SQLCODE < 0, execution was not successful.
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.