LTRIM()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns a string with certain leading characters removed.
USAGE
LTRIM(string[, trim])
Argument Name | Description |
---|---|
| The string to 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
.
EXAMPLES
SELECT QUOTE(LTRIM(' abc ')) AS result;
+--------+
| result |
+--------+
| 'abc ' |
+--------+
SELECT LTRIM('.....abc', '..') AS result;
+--------+
| result |
+--------+
| .abc |
+--------+