LTRIM function removes spaces from the left side of a string, and returns the original string if there are no spaces in the string. 1. Syntax: LTRIM(string). 2. LTRIM only removes spaces on the left; RTRIM only removes spaces on the right; TRIM removes spaces on both sides. 3. LTRIM returns NULL for NULL values.
Usage of LTRIM function in Oracle
LTRIM function is used to remove spaces from the left side of a string .
Syntax
<code>LTRIM(string)</code>
Where:
Usage
The LTRIM function accepts a string argument and returns the string with all spaces on the left trimmed. If there are no spaces in the string, the original string is returned.
Example
<code>SELECT LTRIM(' Hello World ') FROM dual; 输出: Hello World</code>
In this example, the LTRIM function removes all spaces from the left side of the string, producing the result "Hello World".
LTRIM's relationship to RTRIM and TRIM
Note
The above is the detailed content of Usage of ltrim function in oracle. For more information, please follow other related articles on the PHP Chinese website!