MySQL has an RTRIM()
function that enables you to remove trailing whitespace from a string (space at the end of the string).
MySQL also has the TRIM()
function that enables you to remove trailing space, leading space (at the start), space from both sides, or to remove other specified characters from either side (or both sides) of the string.
This article demonstrates how to remove trailing space using each of these functions.