Difference between revisions of "SQLCODE"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision: SQL) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Return a number indicating the result of the last SQL statement | Return a number indicating the result of the last SQL statement | ||
− | |||
==Syntax== | ==Syntax== | ||
SQLCODE | SQLCODE | ||
− | |||
==See Also== | ==See Also== | ||
[[PSEUDO COLUMNS]], [[SQL INSERT|INSERT]], [[SQL SELECT|SELECT]], [[SQL UPDATE|UPDATE]] | [[PSEUDO COLUMNS]], [[SQL INSERT|INSERT]], [[SQL SELECT|SELECT]], [[SQL UPDATE|UPDATE]] | ||
− | |||
==Description== | ==Description== | ||
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" | {| class="wikitable" | ||
Line 26: | Line 21: | ||
|- | |- | ||
|} | |} | ||
− | |||
==Example== | ==Example== | ||
Line 36: | Line 30: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
[[Category:Pseudo Columns]] | [[Category:Pseudo Columns]] |
Revision as of 13:26, 10 February 2012
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
set gateway to "rec@server1:user1/pass1-southind" SELECT * FROM example WHERE state = "MA" ? sqlcode 0