Eliminate spaces at the beginning and end of a string.
SELECT TRIM(‘ SQL Tutorial ‘) AS TrimmedString; |
he TRIM() function eliminates spaces at both the beginning and end of a string.
TRIM(string) |
Parameter |
Description |
string |
Mandatory. Specifies the string from which leading and trailing spaces should be removed. |
Works in: | From MySQL 4.0 |