Apache Hive : HPL/SQL - VALUES INTO Statement

Last updated: August 12, 2026

Apache Hive : HPL/SQL - VALUES INTO Statement

You can use the VALUES INTO statement to assign values to variables in HPL/SQL.

If the variable was not explicitly declared before the assignment, a new variable is created and its data type is derived from the assignment expression.

Syntax:

VALUES expression INTO var;
|
VALUES (expression [, expression2, ...]) INTO (var [, var2, ...]); 

Example:

VALUES 'A' INTO code;
VALUES (0, 100) INTO (count, limit); 

Compatibility: IBM DB2

See also: