Oracle LTRIM function - w3resource (2024)

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 :

NameDescriptionData Types
string1The 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 - w3resource (1)

Examples: Oracle LTRIM function

Here are some Oracle LTRIM function examples :

SQL> SELECT LTRIM(' w3r') "Str" FROM DUAL;Str---w3rSQL> SELECT LTRIM(' w3r ') "Str" FROM DUAL; Str------w3rSQL> SELECT LTRIM('000985','0') "Str" FROM DUAL;Str---985SQL> SELECT LTRIM('0101985','01') "Str" FROM DUAL;Str---985SQL> SELECT LTRIM('125486W3R','0123456789') "Str" FROM DUAL;Str---W3R

Previous: LPAD
Next: NCHR

Oracle LTRIM function - w3resource (2024)
Top Articles
Latest Posts
Article information

Author: Saturnina Altenwerth DVM

Last Updated:

Views: 5979

Rating: 4.3 / 5 (64 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Saturnina Altenwerth DVM

Birthday: 1992-08-21

Address: Apt. 237 662 Haag Mills, East Verenaport, MO 57071-5493

Phone: +331850833384

Job: District Real-Estate Architect

Hobby: Skateboarding, Taxidermy, Air sports, Painting, Knife making, Letterboxing, Inline skating

Introduction: My name is Saturnina Altenwerth DVM, I am a witty, perfect, combative, beautiful, determined, fancy, determined person who loves writing and wants to share my knowledge and understanding with you.