The SQL function trim(trailing from …) removes space characters from the end (right side) of a string.
SELECT TRIM(TRAILING FROM ' traveling spaces ')
FROM …The result of the example is the text ' traveling space' with the trailing spaces removed.
Related
Options:
trim( [ [leading|trailing] [<char>] FROM ] …)Only at the start:
trim(leading from …)Another character:
trim(<char> from …)From both ends (default):
trim(…),trim(both from …)
Product specific forms:
rtrim
Normative References
The trim() function, including the trailing from keywords, is defined in ISO/IEC 9075-2:2023 as mandatory feature E021-09, “TRIM function”.

