Friday, 1 April 2016

SQL LTRIM

This will trim off unwanted characters from the left end of string.

     Syntax: ltrim (string  [,unwanted_chars])

Ex:
SQL> select ltrim('computer','co'), ltrim('computer','com') from dual;

LTRIM(  LTRIM
--------  ---------
mputer   puter

SQL> select ltrim('computer','puter'), ltrim('computer','omputer') from dual;

LTRIM('C  LTRIM('C
----------   ----------
computer   computer
         
           -- If you haven’t specify any unwanted characters it will display entire string.

No comments:

Post a Comment