LTRIM |
LTRIM(string1 [,string2]) |
Removes specific characters from the left side of a string.
Parameters
string1
Specifies the string from which you want leading characters removed.
string2
Specifies a string containing the set of characters to remove. This parameter defaults to a single space. Trimming stops when the function encounters a character not present in this string.
Examples
SQL> SELECT LTRIM(' The default is to trim leading spaces.') 2 FROM dual; LTRIM('THEDEFAULTISTOTRIMLEADINGSPACES -------------------------------------- The default is to trim leading spaces. SQL> SELECT LTRIM('***You can trim other characters as well.','*') 2 FROM dual; LTRIM('***YOUCANTRIMOTHERCHARACTERSASW -------------------------------------- You can trim other characters as well. SQL> SELECT LTRIM('**@@*@You can even trim multiple characters.','*@') 2 FROM dual; LTRIM('**@@*@YOUCANEVENTRIMMULTIPLECHA -------------------------------------- You can even trim multiple characters.
Get Oracle SQL: the Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.