Skip to main content
VeloDB Cloud 4.x is based on Doris 3.x. Versions in this section refer to Doris versions. See Version Mapping.

LENGTH

Description​

Returns the number of bytes in a string.

Syntax​

LENGTH ( <str> )

Parameters​

ParameterDescription
<str>The string whose bytes need to be calculated

Return Value​

The number of bytes in the string <str>.

Example​

SELECT LENGTH("abc"),length("中国")
+---------------+------------------+
| length('abc') | length('中国') |
+---------------+------------------+
| 3 | 6 |
+---------------+------------------+