The details are as follows:
Length (string1) returns the length in characters.
Lengthb (string1) returns the length in bytes.
Lengthc (string1) returns the length in units of Unicode full characters.
Leng22 (string1) returnsCodeThe length of a vertex.
Length4 (string1) returns the length in the unit of ucs4 code points.
Lengthb may have different values in different databases.
For example, the value of lengthb ('har') in different databases may be 2 or 3.
Because different character sets have different Chinese characters,
For example, zhs16gbk is a two-digit string that uses two bytes to define a Chinese character.
In utf8, three bytes are used. (There is also the possibility of utf8 with 2 Chinese characters)
In short, the value of lengthb is related to the character set of your current database.
The biggest difference between length () and lengthb () in Oracle is: SQL> select length ('Happy New Year') from dual;
Length ('Happy New Year ')
------------------
4
SQL> select lengthb ('Happy New Year') from dual;
Lengthb ('Happy New Year ')
-------------------
8
Difference: length is the length of a character,
The length of lengthb is measured in bytes.