SQLException.getSQLState
retrieves the SQLState
for the SQLException
object. What are all the possible values that can be returned by this
The X/Open (now Open Group) standards are now available free of charge (but registration required). See Data Management: SQL Call Level Interface (CLI) for the SQL CLI (aka ODBC) standard, SQLSTATE codes are defined in Appendix A. And Data Management: Structured Query Language (SQL), Version 2 for the SQL standard, SQLSTATE codes are defined in Appendix B. As for the ISO standards, while you have to pay for the official versions, the final drafts (which are almost identical) are freely available; for SQL:2011, see page 2017 (by PDF numbering; 1194 by document page numbering) of Final Committee Draft ISO/IEC FCD 9075-2