The TRIM() function removes the space character OR other specified characters from the start or end of a string. By default, the TRIM() function removes leading and trailing spaces from a string.
How do you trim a character in SQL?
You replace all spaces with that character. You replace the character * you want to trim with a space. You LTrim + RTrim the obtained string. You replace back all spaces with the trimmed character *
What does trim function do in MySQL?
TRIM() function in MySQL is used to clean up data. It is also used to remove the unwanted leading and trailing characters in a string.