Collections:
RIGHT() - Last N Characters
How to return last N characters from a given string using the RIGHT() function?
✍: FYIcenter.com
RIGHT(str, len) is a MySQL built-in function that returns the
last N characters of a giving string. For example:
SELECT RIGHT('dba.FYIcenter.com', 3);
-- +-------------------------------+
-- | RIGHT('dba.FYIcenter.com', 3) |
-- +-------------------------------+
-- | com |
-- +-------------------------------+
Reference information of the RIGHT() function:
RIGHT(str, len): substr Returns the rightmost len characters from the string str, or NULL if any argument is NULL. Arguments, return value and availability: str: Required. The given string to be extracted from. len: Required. The number of characters of the substring. substr: Return value. The substring of last len characters. Available since MySQL 4.0.
Related MySQL functions:
⇒ RPAD() - Right-Padding String
⇐ REVERSE() - Reversing String
2023-11-12, 1546🔥, 0💬
Popular Posts:
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPA...
How to connect SQL Server Management Studio Express to SQL Server 2005 Express in SQL Server? Once y...
How To Connect ASP Pages to Oracle Servers in Oracle? If you are running Windows IIS Web server and ...
How To Assign Debug Privileges to a User in Oracle? In order to run SQL Developer in debug mode, the...
How To Connect to a MySQL Server with a Port Number in MySQL? If you want to connect a MySQL server ...