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, 969🔥, 0💬
Popular Posts:
How to obtain the number of rows found by the last SELECT statement using the FOUND_ROWS() function?...
Where Is the Export Dump File Located in Oracle? If you are not specifying the dump directory and fi...
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter millise...
What Is Program Global Area (PGA) in Oracle? A Program Global Area (PGA) is a memory buffer that is ...
Where to find Oracle database server tutorials? Here is a collection of tutorials, tips and FAQs for...