List of SQLSTATE class codes

The following table lists the valid SQLSTATE class and subclass values. This figure lists the first entry for each class code in bold.
Table 1. Class and subclass codes for SQLSTATE
Class Subclass Meaning
00 000 Success
01

01

01

01

01

01

01

000

002

003

004

005

006

007

Success with warning

Disconnect error—transaction rolled back

Null value eliminated in set function

String data, right truncation

Insufficient item descriptor areas

Privilege not revoked

Privilege not granted

01

01

01

01

01

01

01

01

01

01

01

I01

I03

I04

I05

I06

I07

I08

I09

I10

I11

U01

Database has transactions

ANSI-compliant database selected

The database server is a recent version of HCL OneDB™

Float to decimal conversion used

HCL OneDB extension to ANSI-compliant standard syntax

After a DESCRIBE, a prepared UPDATE/DELETE statement does not have a WHERE clause

An ANSI keyword was used as cursor name

Number of items in select list is not equal to number of items in INTO list

Database server is running in secondary mode

DATASKIP feature is turned on

User-defined warning returned by a user-defined routine

02 000 No data found or end of data reached
07

07

07

07

07

07

07

07

07

000

001

002

003

004

005

006

008

009

Dynamic SQL error

USING clause does not match dynamic parameters

USING clause does not match target specifications

Cursor specification cannot be executed

USING clause is required for dynamic parameters

Prepared statement is not a cursor specification

Restricted data type attribute violation

Invalid descriptor count

Invalid descriptor index

08

08

08

08

08

08

08

08

000

001

002

003

004

006

007

S01

Connection exception

Database server rejected the connection

Connection name in use

Connection does not exist

Client unable to establish connection

Transaction rolled back

Transaction state unknown

Communication failure

0A

0A

000

001

Feature not supported

Multiple database server transactions

21

21

21

000

S01

S02

Cardinality violation

Insert value list does not match column list

Degree of derived table does not match column list

22

22

22

22

22

22

22

22

22

22

000

001

002

003

005

012

019

024

025

027

Data exception

String data, right truncation

Null value, no indicator parameter

Numeric value out of range

Error in assignment

Division by zero

Invalid escape character

Unterminated string

Invalid escape sequence

Data exception trim error

23 000 Integrity-constraint violation
24 000 Invalid cursor state
25 000 Invalid transaction state
2B 000 Dependent privilege descriptors still exist
2D 000 Invalid transaction termination
26 000 Invalid SQL statement identifier
2E 000 Invalid connection name
28 000 Invalid user-authorization specification
33 000 Invalid SQL descriptor name
34 000 Invalid cursor name
35 000 Invalid exception number
37 000 Syntax error or access violation in PREPARE or EXECUTE IMMEDIATE
3C 000 Duplicate cursor name
40

40

000

003

Transaction rollback

Statement completion unknown

42 000 Syntax error or access violation
S0

S0

S0

S0

S0

000

001

002

011

021

Invalid name

Base table or view table exists

Base table not found

Index exists

Column exists

S1 001 Memory-allocation error message
IX 000 HCL OneDB reserved error message
IX 001 GET DIAGNOSTICS statement failed
U0 001 User-defined error returned by a user-defined routine
The ANSI or X/Open standards define all SQLSTATE values except the following:
  • A "IX000" runtime error indicates an error message that is specific to HCL OneDB.
  • A "IX001" runtime error indicates the GET DIAGNOSTiCS statement failed.
  • A "U0001" runtime error indicates a user-defined error message.
  • The "01Ixx" warnings indicate warnings that are specific to HCL OneDB.
  • The "01U01" warning indicates a user-defined warning message.

For more information about non-standard error values, see Runtime errors in SQLSTATE. For more information about non-standard warning values, see Warnings in SQLSTATE.