The LENGTH function returns the number of characters in a string. It accepts CHAR, VARCHAR2, NCHAR, and NVARCHAR2 data types as input, ignores whitespace, and returns an integer result.
Usage of LENGTH function in Oracle
LENGTH functionReturns the characters of string data number. It has the following format:
<code>LENGTH(string_expression)</code>
where:
Syntax
The LENGTH function accepts the following data types as input:
Return value
LENGTH function returns an integer representing the number of characters in the string.
Example
The following example shows how to use the LENGTH function:
<code class="sql">SELECT LENGTH('Hello World') FROM dual;</code>
Output:
<code>10</code>
In the above example, LENGTH The function returns the number of characters in the string 'Hello World', which is 10.
Note
The above is the detailed content of length usage in oracle. For more information, please follow other related articles on the PHP Chinese website!