LTRIM stands for left trim, and it trims blank spaces occurring on the
left side of a given string.
LTRIM(string)
select ltrim(' smith');
------------------------ smith
select ltrim('Hello');
------------------- Hello
In MySQL the LTRIM function also does the same job. i.e. it trims any blank spaces from the left side of a given string.
LTRIM(string)
mysql> select ltrim(' smith'); +-------------------+ | ltrim(' smith') | +-------------------+ | smith | +-------------------+ 1 row in set (0.00 sec) mysql> select ltrim('Hello'); +----------------+ | ltrim('Hello') | +----------------+ | Hello | +----------------+ 1 row in set (0.00 sec)
Back to Converting Functions from MSSQL to MySQL