In this guide, we will explain how to use the MySQL LTRIM function with syntax and examples.
Description
The MySQL LTRIM function removes all space characters from the left-hand side of a string.
Syntax
The syntax for the LTRIM function in is:
LTRIM( string )
Parameters or Arguments
string
The string to trim the space characters from the left-hand side.
Applies To
The LTRIM function can be used in the following versions of :
- MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23
Example
Let’s look at some LTRIM function examples and explore how to use the LTRIM function.
For example:
mysql> SELECT LTRIM(' Ad gl o b'); Result: 'Ad gl o b' mysql> SELECT LTRIM(' Ad gl o b '); Result: 'Ad gl o b ' mysql> SELECT LTRIM(' adglob.in'); Result: 'adglob.in'
Next Topic : Click Here
Pingback: MySQL: LPAD Function | Adglob Infosystem Pvt Ltd