TRIM

Description

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.

Example

TRIM('   I like Atfinity ')

This will remove the spaces before and after leaving only the text 'I like Atfinity' without the spaces behind.

Example with custom character

TRIM('__hello__', '_')

This will remove the underscores before and after leaving only the text 'hello' without the spaces behind.

Last updated