HPL/SQL is included to Apache Hive since version 2.0
HPL/SQL is included to Apache Hive since version 2.0
COALESCE function returns first non-NULL expression.
Syntax:
COALESCE(expr1, expr2 [, expr3, ...]);
Parameters:
Parameter | Type | Value |
exprN | Any | Variable or expression |
Notes:
Return Value:
Return Type:
The data type of first non-NULL expression.
Example 1:
COALESCE(NULL, 1, 2, 3);
Result: 1
Compatibility: Oracle, IBM DB2, Teradata, Microsoft SQL Server, PostgreSQL, MySQL and Netezza
Version: PL/HQL 0.03
See also: