Other related articles:

Recently viewed articles:

LTRIM (SQL)

LTRIM SQL Function removes any spaces or unwanted characters on the left of the character string. LTRIM SQL function returns the characters of string with leading blanks removed. The syntax is:

LTRIM (character string [, unwanted])

Example:

The following LTRIM SQL function returns the string “ABCD

SELECT LTRIM ('      ABCD') FROM dual;

Output:
ltrim-sql-image1

Example 2:

The following LTRIM SQL function  will remove any exclamation (!) characters on left side of string and return ‘abcd’ as output:

SELECT LTRIM (‘!!!!abcd’,'! ') FROM dual;

Output:
ltrim-sql-image2