This function is used to return the length of a specified string in bytes.
Similar function: length. The length function is used to return the length of a string and return a value of the BIGINT type.
lengthb(string <str>)
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
str |
Yes |
STRING |
Input string |
The return value is of the STRING type.
The value 5 is returned.
select lengthb('hello');
The value NULL is returned.
select lengthb(null);