The function
TRIM
removes leading and trailing spaces
SELECT 
    LENGTH(' text ') length,
    LENGTH(TRIM(' text ')) length_with_trim
by Valeri Tandilashvili
4 years ago
MySQL
String functions
Full MySQL Course for Beginners
1
Pro tip: use ```triple backticks around text``` to write in code fences