Files
doris/docs/en/sql-reference/sql-functions/string-functions/length.md
yangzhg 94b3a2bd50 [Bug] Fix string functions not support multibyte string (#3345)
Let string functions support utf8 encoding
2020-05-08 12:52:46 +08:00

1.2 KiB

title, language
title language
length en

length

Description

Syntax

'INT length (VARCHAR str)'

Returns the length of the string in byte size.

example

mysql> select length("abc");
+---------------+
| length('abc') |
+---------------+
|             3 |
+---------------+

mysql> select length("中国");
+------------------+
| length('中国')   |
+------------------+
|                6 |
+------------------+

##keyword LENGTH