RTRIM to remove space suffix to a string

RTRIM() removes trailing spaces. Use LTRIM() for leading spaces or TRIM() for both ends.


MySQL Rtrim
SELECT RTRIM('plus2net.com    ') -- Output plus2net.com

RTRIM with UPDATE

To remove blank space after the name in our student table
UPDATE student SET name=RTRIM(name)
Read more on UPDATE Query
We can add space to a column and then display after removing
SELECT CONCAT(name,'    '), RTRIM(CONCAT(name, '   '))  FROM student
Read more on CONCAT






Subscribe to our YouTube Channel here



plus2net.com




SQL Video Tutorials










✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer