MySQL has a TRIM()
function that enables you to remove leading and/or trailing whitespace from a string.
You can also use it to remove other specified characters from either side (or both sides) of the string.
This article focuses on removing whitespace from both sides of the string.