SQLSTATE code
ID sqlstate
DatatypeNot PIIcategoricalDraft
This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).
Five-character code with which a SQL database reports the result of a statement, defined by the SQL standard. The first two characters are the class of the condition and the last three are the condition in that class. A code that ends in 000 is the generic code of its class. Codes use digits and capital letters. PostgreSQL, Db2, Oracle and ODBC and JDBC drivers return them, and database logs store them.
- Categories
- Software development
- Countries
- Global (not tied to a country)
- Languages
- Common to most languages
- Quality
- 80/100 · missing: mapping (Wikidata, Schema.org, ...), detector coverage
- Metacrafter rules
- no detection rule yet
- Supported by tools
- no tool record lists this type yet
Regular expression
^[0-9A-Z]{5}$
Python re syntax.
Examples
| Value | Description |
|---|---|
| 42601 | syntax_error in PostgreSQL |
| 23505 | unique_violation in PostgreSQL |
| 42P01 | undefined_table in PostgreSQL |
| 40P01 | deadlock_detected in PostgreSQL |
| 42p01 invalid | Lowercase letter |
Translations
| Language | Name | Description |
|---|---|---|
| Russian | Код SQLSTATE |
Sources
Use this record
- Page URL:
https://registry.apicrafter.io/datatype/sqlstate - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/software/sqlstate.yamlon GitHub