totn MariaDB Functions

MariaDB: LTRIM Function

This MariaDB tutorial explains how to use the MariaDB LTRIM function with syntax and examples.

Description

The MariaDB LTRIM function removes all space characters from the left-hand side of a string.

Syntax

The syntax for the LTRIM function in MariaDB 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 MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB LTRIM function examples and explore how to use the LTRIM function in MariaDB.

For example:

SELECT LTRIM('   TechOnTheNet.com');
Result: 'TechOnTheNet.com'

SELECT LTRIM('   Tech   on   the   net   ');
Result: 'Tech   on   the   net   '

SELECT LTRIM('    TechOnTheNet.com knows MariaDB!');
Result: 'TechOnTheNet.com knows MariaDB!'