LTRIM()

Overview

Returns a string with certain leading characters removed.

USAGE

LTRIM(string[, trim])

Argument Name

Description

string

The string to trim

trim

Optional. The string of characters to trim. Defaults to a space

DETAILS

LTRIM() is a string function that returns a string with certain leading characters removed.

If the trim argument is not specified, one or more spaces are removed from the start of the string and the resulting value is returned.

If the trim argument is not specified, one or more instances of trim are removed from the start of the string and the resulting value is returned.

A NULL is returned if either argument is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT QUOTE(LTRIM('  abc ')) AS result;
+--------+
| result |
+--------+
| 'abc ' |
+--------+
SELECT LTRIM('.....abc', '..') AS result;
+--------+
| result |
+--------+
| .abc   |
+--------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES