Collections:
RTRIM() - Right-Trimming String
How to trim off space characters from a string at the right end using the RTRIM() function?
✍: FYIcenter.com
RTRIM(str) is a MySQL built-in function that
trims off space characters from a string at the right end.
For example:
SET @str = 'dba.FYIcenter.com '; SELECT RTRIM(@str); -- +-------------------+ -- | RTRIM(@str) | -- +-------------------+ -- | dba.FYIcenter.com | -- +-------------------+
Reference information of the RTRIM() function:
RTRIM(str): modstr Returns the string str with trailing space characters removed. Returns NULL if str is NULL. Arguments, return value and availability: str: Required. The string that will be right-trimmed from. modstr: Return value. The modified string after trimming. Available since MySQL 4.0.
Related MySQL functions:
⇒ SOUNDEX() - Soundex Encoding
⇐ RPAD() - Right-Padding String
2023-11-11, 1199🔥, 0💬
Popular Posts:
What Are the Underflow and Overflow Behaviors on FLOAT Literals in SQL Server Transact-SQL? If you e...
How To Replace Given Values with NULL using NULLIF() in SQL Server Transact-SQL? Sometime you want t...
How To Verify a User name with SQLCMD Tool in SQL Server? The quickest way to verify a user name in ...
How To List All Stored Procedures in the Current Database in SQL Server Transact-SQL? If you want to...
How To Generate Random Numbers with the RAND() Function in SQL Server Transact-SQL? Random numbers a...