Apache Hive : HPL/SQL - LENGTH Function

Last updated: August 12, 2026

Apache Hive : HPL/SQL - LENGTH Function

LENGTH function returns the length of the specified string expression in characters.

Syntax:

LENGTH(string_expression); 

Return Data Type:

STRING

Example:

LENGTH('Abc ');
---
4

Compatibility: Oracle, IBM DB2, Teradata, PostgreSQL, MySQL and Netezza

See also: