Collections:
LEFT() - First N Characters
How to return first N characters from a given string using the LEFT() function?
✍: FYIcenter.com
LEFT(str, len) is a MySQL built-in function that returns the
first N characters of a giving string. For example:
SELECT LEFT('dba.FYIcenter.com', 3);
-- +------------------------------+
-- | LEFT('dba.FYIcenter.com', 3) |
-- +------------------------------+
-- | dba |
-- +------------------------------+
Reference information of the LEFT() function:
LEFT(str, len): substr Returns the leftmost 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 first len characters. Available since MySQL 4.0.
Related MySQL functions:
⇒ LENGTH() - Number of Bytes in String
⇐ LCASE() - Synonym for LOWER()
2023-11-12, 1491🔥, 0💬
Popular Posts:
How To Get the Definition of a View Out of the SQL Server in SQL Server? If you want get the definit...
How To Recover a Dropped Index in Oracle? If you have the recycle bin feature turned on, dropped ind...
Where to find answers to frequently asked questions on Managing Security, Login and User in SQL Serv...
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...
How to convert a JSON (JavaScript Object Notation) quoted string into a regular character string usi...