TRIM
Removes the longest string containing only specified characters from the start, end, or both ends of the string.
TRIM([LEADING | TRAILING | BOTH] [characters] FROM string)
LEADING | TRAILING | BOTH
Specifies from where to remove (BOTH by default).
characters
Characters to remove (space by default).
FROM string
The input string.
Examples
SELECT TRIM(
BOTH 'x'
FROM 'xTomx'
)