The frequently used string functions include LENGTH, SUBSTR, CONCAT, UPPER, LOWER, LTRIM, RTRIM, and TRIM.
Note that in an Oracle tenant, the LENGTH function calculates string lengths in characters and the LENGTHB function calculates string lengths in bytes, as defined by the character set.
Examples
Example 1
Check the string length of the character "abc".
obclient> SELECT LENGTH('abc'), LENGTHB('abc') FROM DUAL;
+---------------+----------------+
| LENGTH('ABC') | LENGTHB('ABC') |
+---------------+----------------+
| 3 | 3 |
+---------------+----------------+
1 row in set
Example 2
View the length of the NLS_CHARACTERSET character set.
obclient> SELECT * FROM sys.nls_database_parameters WHERE PARAMETER='NLS_CHARACTERSET';
+------------------+----------+
| PARAMETER | VALUE |
+------------------+----------+
| NLS_CHARACTERSET | AL32UTF8 |
+------------------+----------+
1 row in set