LTRIM(str) function returns the string str after remove the leading space characters means if you want to remove the all spaces from the left side of a string in mysql you can use this LTRIM mysql function.
Here I am giving a example to explain this-
mysql> SELECT LTRIM(' HELLO MySQL');
+---------------------------------+
| LTRIM(' HELLO MySQL') |
+---------------------------------+
| HELLO MySQL |
+---------------------------------+
1 row in set (0.00 sec)
mysql> SELECT LTRIM(' HELLO MySQL ');
+-------------------------------------+
| LTRIM(' HELLO MySQL ') |
+-------------------------------------+
| HELLO MySQL |
+-------------------------------------+
1 row in set (0.00 sec)
mysql> SELECT LTRIM(' HELLO MySQL. Remove on Left side space.');
+----------------------------------------------------------------+
| LTRIM(' HELLO MySQL. Remove on Left side space.') |
+----------------------------------------------------------------+
| HELLO MySQL. Remove on Left side space. |
+----------------------------------------------------------------+
1 row in set (0.00 sec)
0 Comment(s)