w3resource

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

Oracle LTRIM function 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

Previous: LPAD
Next: NCHR



Follow us on Facebook and Twitter for latest update.