forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com> Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
5.9 KiB
5.9 KiB
length
This function is used to return the length of a string.
Similar function: lengthb. The lengthb function is used to return the length of string str in bytes and return a value of the STRING type.
Syntax
length(string <str>)
Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
str |
Yes |
STRING |
Target string to be searched for If the value is of the BIGINT, DOUBLE, DECIMAL, or DATETIME type, the value is implicitly converted to the STRING type for calculation. For other types of values, an error is reported. |
Return Values
The return value is of the BIGINT type.
Parent topic: String Functions