User Tools

Site Tools


Sidebar

**HPL/SQL is included to Apache Hive since version 2.0** * [[home|Home]]\\ * [[why|Why HPL/SQL]]\\ * [[features|Key Features]]\\ * [[start|Get Started]]\\ * [[doc|HPL/SQL Reference]]\\ * [[download|Download]]\\ * [[new|What's New]]\\ * [[about|About]]

close

CLOSE Statement - PL/HQL Reference

CLOSE statement closes a cursor.

Syntax:

CLOSE cursor_name;

Parameters:

Parameter Type Value Description
cursor_name Identifier The name of the previously opened cursor

Examples:

DECLARE id INT;
DECLARE cur CURSOR FOR 'SELECT id FROM db.orders';
OPEN cur;
FETCH cur INTO id;
CLOSE cur;

Compatibility: Oracle, IBM DB2, Teradata, SQL Server, PostgreSQL, MySQL.

See also: