TRIM removes whitespace (like " ") from the beginning or end of a string.
Optionally, you can also provide a second argument of the characters you would like to remove.
If you only want to remove characters from the left, consider using TRIM_LEFT.
TRIM_LEFT
TRIM(' I like Atfinity ')
This will remove the spaces before and after leaving only the text 'I like Atfinity' without the spaces behind.
'I like Atfinity'
TRIM('__hello__', '_')
This will remove the underscores before and after leaving only the text 'hello' without the spaces behind.
'hello'
Last updated 3 years ago
Was this helpful?