LENGTH2
LENGTH2 is an SQL function that returns the length of a specified string, but unlike the LENGTH function, it calculates the length using byte. It thus helps determine the size of a Unicode string in bytes, accounting for multi-byte characters.
Example
Output
Explanation
The LENGTH2 function in Oracle SQL returns the number of bytes in a given string. In the provided example, ‘Oracle SQL’ consists of 10 bytes, thus, the output is 10.