LENGTH
Description​
Returns the number of bytes in a string.
Syntax​
LENGTH ( <str> )
Parameters​
Parameter | Description |
---|---|
<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 |
+---------------+------------------+