SQLSTATE: Difference between revisions

Content deleted Content added
Kelti (talk | contribs)
m Wording
Kelti (talk | contribs)
Working citation to SQL-2011 added
 
Line 1:
{{More citations needed|date=December 2024}}
 
Programs calling a database that accords 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).
 
Line 7 ⟶ 5:
* 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]].<ref name="WhitemarshWhitemarsh2" /> The table's last column shows the part of the standard that defines the row. If it is empty, the definition originates from part 2 ''Foundation''.
 
{|class="wikitable"
Line 622 ⟶ 620:
==References==
{{reflist|30em|refs=
<ref name="Whitemarsh2">
<ref name="Whitemarsh">{{ cite journalcitation | url = httphttps://www.wiscorp.com/sql200nsql20nn.zip | format = Zip | title = SQL:20082011 draft | publisher = Whitemarsh Information Systems Corporation }}<| archive-url = https:/ref>/web.archive.org/web/20230525220603/https://www.wiscorp.com/sql20nn.zip | archive-date = 25 May 2023
}}
</ref>
 
}}