Tags
MySQL , RTRIM
Asked 1 years ago
31 May 2022
Views 397
kord

kord posted

how to use function RTRIM in MySQL?

how to use RTRIM in MySQL ? can you please explain function RTRIM in MySQL with some example?
hanuman

hanuman
answered May 31 '22 00:00

The RTRIM function is used to right side trim a given string in MySQL.
The RTRIM function removes white space from the right side of the given string in MySQL.
for example " an example " string has white space before and after and if you want to remove it from the right side in MySQL The RTRIM function will do the job.



select RTRIM(' an example ')  



above query returns " an example"(without whitespace at end of the string)
Post Answer