TRIM()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the provided string with its leading and/or trailing space characters removed.
USAGE
TRIM(string)
Argument Name | Description |
---|---|
| The string to be trimmed |
DETAILS
TRIM()
is a string function that returns a string with ts leading and/or trailing space characters removed.
A NULL
is returned if the argument is NULL
.
EXAMPLES
SELECT QUOTE(TRIM(' abc ')) AS result1,
QUOTE(TRIM('abc')) AS result2,
TRIM(NULL);
+---------+---------+------------+
| result1 | result2 | TRIM(NULL) |
+---------+---------+------------+
| 'abc' | 'abc' | NULL |
+---------+---------+------------+