SQLCODE

From Lianjapedia
Revision as of 09:53, 4 February 2013 by Yvonne.milne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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