TRIM
Removes spaces (or other characters) at the start and end of a string.
Syntax
TRIM(<text>)
TRIM(LEADING <characters> FROM <text>)
TRIM(TRAILING <characters> FROM <text>)
TRIM(BOTH <characters> FROM <text>)
Without extra words it removes spaces from both ends. LEADING — only at the start, TRAILING — only at the end, BOTH — from both sides. Most often it's used to clean up what people typed: ' Emma ' from a form is no longer 'Emma' when you compare.