User Tools

Site Tools


Sidebar

HPL/SQL is included to Apache Hive since version 2.0

sqlcode

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== SQLCODE - PL/HQL Reference ====== SQLCODE built-in variable contains the return code of the last SQL statement. The code can be zero (0), negative or positive: | **SQLCODE** | **Result** | | 0 | Successful execution | | Positive values | Warning | | Negative values | Error | Note: * SQLCODE 100 means row not found or end of cursor <code language=sql> DECLARE id INT; DECLARE cur CURSOR FOR 'SELECT id FROM db.orders'; OPEN cur; FETCH cur INTO id; WHILE SQLCODE = 0 THEN FETCH cur INTO id; END WHILE; CLOSE cur; </code> **Compatibility:** IBM DB2. **Version:** PL/HQL 0.01 **See also:** * [[error-handling|Error Handling]] * [[sqlstate|SQLSTATE]] * [[get-diagnostics|GET DIAGNOSTICS]] * [[resignal|RESIGNAL]]