Oracle LTRIM function
Description
The Oracle LTRIM() function is used to remove all specified characters from the left end side of a string. Optionally you can specify an initial character or characters to trim to, or it will default to a blank.
Syntax:
LTRIM(string1 [, set ])
Parameters :
Name | Description | Data Types |
---|---|---|
string1 | The string to trim the characters from the left-hand side. | CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB |
set (optional) | String which is used for trimming. | CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB |
Return Value Type
VARCHAR2
Applies to
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
Pictorial Presentation
Examples: Oracle LTRIM function
Here are some Oracle LTRIM function examples :
SQL> SELECT LTRIM(' w3r') "Str" FROM DUAL;
Str
---
w3r
SQL> SELECT LTRIM(' w3r ') "Str" FROM DUAL;
Str
------
w3r
SQL> SELECT LTRIM('000985','0') "Str" FROM DUAL;
Str
---
985
SQL> SELECT LTRIM('0101985','01') "Str" FROM DUAL;
Str
---
985
SQL> SELECT LTRIM('125486W3R','0123456789') "Str" FROM DUAL;
Str
---
W3R
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework