You are on page 1of 2

SQL CODES

SQL CODE 00    - >     Successful

POSITIVE CODES (WARNINGS):


SQL CODE +98    ->   A dynamic SQL should end with semicolon
SQL CODE +100   ->   End of cursor / Successful Row not found
SQL CODE +222 -> Trying to fetch a row that fell through a DELETE hole
SQL CODE +223 -> Trying to fetch a row that fell through an UPDATE hole
SQL CODE +231 -> FETCH after a BEFORE or AFTER but not on a valid row
SQL CODE +562 -> A grant of a privilege was ignored because the grantee
already has the privilege from the granter.
SQL CODE +802 -> The null indicator was set to -2 as an arithmetic.
SQL CODE +304 -> Value cannot be assigned to this host variable because it
is out of range.

NEGATIVE CODES (ERRORS):

SQL CODE -104     ->    SQL Syntax Error


SQL CODE -180 -> Bad data in DATE/Time/TimeStamp-String representation of
DATE,TIME,TIMESTAMP is invalid
SQL CODE -181   -> Bad data in Date/Time/Timestamp Value for DATE, TIME,
TIMESTAMP is invalid
SQL CODE -199 ->  Illegal use of the specified keyword.
SQL CODE -305 ->  Null indicator needed
SQL CODE -311  -> Varchar, insert or update.
You didn’t set the -LEN field with the right data length
SQL CODE -501  -> Cursor not open on FETCH
SQL CODE -502 -> Opening cursor that is already open
SQL CODE -503 -> A column cannot be updated because it is not identified in
the UPDATE clause of the SELECT statement of the
CURSOR.
SQL CODE -507 -> The cursor identified in UPDATE or DELETE statement is
not open.
SQL CODE -508 -> The cursor identified in UPDATE or DELETE statement is
not positioned on a row.
SQL CODE -551 ->  Not authorized to access DB2
SQL CODE -602 -> Too many columns specified in a create index.
SQL CODE -638 -> Table cannot be created because column definition is
Missing
SQL CODE -658 -> Cannot be dropped using the statement.
SQL CODE -672 -> Operation DROP not allowed on Table.
SQL CODE -680 -> Too many columns specified for a table or view or table
function.
SQL CODE -685 -> Invalid Field type.
SQL CODE -803  -> Duplicate key on insert or update
SQL CODE -805    -> DBRM or package not found in plan Is plan name correct?
SQL CODE -811  -> More than one row retrieved in SELECT INTO
SQL CODE -818 -> Plan and program: timestamp mismatch
SQL CODE -904   -> Unavailable resource. Someone is locking the data you need you
may choose to terminate the program
SQL CODE -911   -> Deadlock or timeout. Rollback has been done.
SQL CODE -913   -> Your program was the victim of a deadlock or timeout.
NO rollback has been done.
You should do a ROLLBACK.
SQL CODE -922  -> Authorization needed
SQL CODE -927  -> The language interface was called but no connection had been

You might also like