This Oracle tutorial explains how to use the Oracle/PLSQL LENGTH2 function with syntax and examples.
The Oracle/PLSQL LENGTH2 function returns the length of the specified string, using UCS2 code points.
The syntax for the LENGTH2 function in Oracle/PLSQL is:
The string to return the length for. It can be CHAR, VARCHAR2, NCHAR, or NVARCHAR2, but it can not be CLOB or NCLOB.
The LENGTH2 function returns a numeric value. If string1 is NULL, then the LENGTH2 function will return NULL.
The LENGTH2 function can be used in the following versions of Oracle/PLSQL:
Let's look at some Oracle LENGTH2 function examples and explore how to use the LENGTH2 function in Oracle/PLSQL.
For example: