Difference between revisions of "SQLCODE"
From Lianjapedia
Helen.george (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 11: | Line 11: | ||
SQLCODE will return a number indicating the result of the last SQL statement. SQLCODE return values: | SQLCODE will return a number indicating the result of the last SQL statement. SQLCODE return values: | ||
− | {| class="wikitable" width=100% | + | {| class="wikitable" width="100%" |
!SQLCODE||Description | !SQLCODE||Description | ||
|- | |- | ||
Line 24: | Line 24: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | |||
SELECT * FROM example WHERE state = "MA" | SELECT * FROM example WHERE state = "MA" | ||
? sqlcode | ? sqlcode | ||
Line 32: | Line 31: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
− |
Latest revision as of 09:53, 4 February 2013
Contents
Purpose
Return a number indicating the result of the last SQL statement
Syntax
SQLCODE
See Also
PSEUDO COLUMNS, INSERT, SELECT, UPDATE
Description
SQLCODE will return a number indicating the result of the last SQL statement. SQLCODE return values:
SQLCODE | Description |
---|---|
0 | The SQL statement completed successfully |
+100 | No rows were found or the end of the set reached |
<0 | An error occurred |
Example
SELECT * FROM example WHERE state = "MA" ? sqlcode 0