CACrown ArchivesThe cinema collection
Menu
Research dossier · General Reference

SQLSTATE

Client programs calling an SQL database receive an indication about the success or failure of the call. This return code is named SQLSTATE. It consists of 5 byte.

Cross-disciplinary reference desk with index cards, atlas, dictionary and catalogue
General referenceInterpretive dossier study · Crown Archives visual atlas
Record originEnglish Wikipedia
Text licenseCC BY-SA 4.0
Source revisionAug 24, 2026
Entity authorityQ56291527
Source-derived summary

Programs calling a database that conforms to the SQL standard receive an indication of the success or failure of the call. This return code - which is called SQLSTATE - consists of 5 bytes. They are divided into two parts: the first and second bytes contain a class and the following three a subclass. Each class belongs to one of four categories: "S" denotes "Success" (class 00), "W" denotes "Warning" (class 01), "N" denotes "No data" (class 02), and "X" denotes "Exception" (all other classes).

Real DBMSs are free to define additional values for SQLSTATE to handle those features that are beyond the standard. Such values must use one of the characters [I-Z] or [5-9] as the first byte of class (first byte of SQLSTATE) or subclass (third byte of SQLSTATE).

In addition to SQLSTATE, the SQL command GET DIAGNOSTICS offers more details about the last executed SQL command.

In very early versions of the SQL standard, the return code was called SQLCODE and used a different coding schema.

The following table lists the standard-conforming values - based on SQL:2011. The table's last column shows the part of the standard that defines the row.

Editorial summary

Begin with the source’s own compact description: “SQLSTATE” is client programs calling an SQL database receive an indication about the success or failure of the call. This return code is named SQLSTATE. It consists of 5 byte. The dossier treats that line as a proposition to test through SQLSTATE, Client and programs, not as a finished interpretation.

Editorial reviewA practical starting point whose main value is the path it opens into stronger specialist and primary sources. The current lead gives the account dated anchors—2011—that can be checked directly. The selected authority fields contribute no independent date. For this dossier, SQLSTATE, Client and programs is the immediate research focus.
Editorial analysis

Why this record matters

The phrase “client programs calling an SQL database receive an indication about the success or failure of the call. This return code is named SQLSTATE. It consists of 5 byte” supplies a clear boundary for inquiry. It also exposes the unanswered questions: who defined that boundary, when it became stable and which sources sit outside it.

Evidence profile

The citation trail is more important than the brevity of the summary: it shows where individual claims can be examined in context. The source revision retrieved here is dated Aug 24, 2026. The linked authority identifier is Q56291527. None of the 0 selected statements returned an explicit reference. The first chronological checks are 2011.

Critical limits

The absence of detail may reflect summary conventions rather than a lack of surviving documentation. The lead is largely declarative, so disagreement and counter-evidence require a deliberate search beyond the opening account. Authority statements aid reconciliation but still require their own references, qualifiers and ranks to be checked.

How to read it

Use the entry as an orientation point, then follow its citations and revision history. Names, dates and institutional relationships should be checked against the original record.

Best used for
  • Subject orientation
  • Search vocabulary
  • Locating named sources
Verify next

The closest primary source, responsible institution and strongest cited specialist reference.

Three-step research path

  1. Establish the record: confirm the title “SQLSTATE”, its source revision and the description used here.
  2. Expand the search: follow SQLSTATE primary sources, SQLSTATE archive and SQLSTATE research across catalogues and specialist indexes.
  3. Test the account: compare the strongest cited source with the responsible institution’s current record and note any disagreement.

Questions for further research

  1. Which source most directly establishes the central claim about “SQLSTATE”?
  2. What terminology or title could unlock a more precise catalogue search?
  3. Which cited source is closest to the event, object or claim?
Subject index

Search terms from this dossier

Source & attribution

This entry incorporates text from SQLSTATE” on English Wikipedia. Contributors are listed in the page history. Text is available under the Creative Commons Attribution-ShareAlike 4.0 License. Selected authority identifiers and statements are retrieved from Wikidata under CC0; their references and qualifiers remain part of the verification path.