Mysql Ltrim Function

MySQL: LTRIM Function

This tutorial explains 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 MySQL 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:

  • 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 MySQL LTRIM function examples and explore how to use the LTRIM function in MySQL.

For example:

mysql> SELECT LTRIM('    AODBA.com');
Output: 'AODBA.com'