Collections:
QUOTE() - MySQL Quoting String
How to escape quotes in string to be used in MySQL statements using the QUOTE() function?
✍: FYIcenter.com
QUOTE(str) is a MySQL built-in function that
escapes quotes in a given string to be used in MySQL statements.
For example:
SELECT QUOTE("It's 5 o'clock!");
-- +--------------------------+
-- | QUOTE("It's 5 o'clock!") |
-- +--------------------------+
-- | 'It\'s 5 o\'clock!' |
-- +--------------------------+
Reference information of the QUOTE() function:
QUOTE(str): modstr
Escapes the sting str with each instance of backslash (\), single
quote ('), ASCII NUL, and Control+Z preceded by a backslash.
Arguments, return value and availability:
str: Required. The given string to be escaped
modstr: Return value. The escaped string.
Available since MySQL 5.7.
⇐ POSITION() - Synonym for LOCATE()
2023-11-13, 1406🔥, 0💬
Popular Posts:
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...
How To Update Multiple Rows with One UPDATE Statement in SQL Server? If the WHERE clause in an UPDAT...
How to run Queries with SQL Server Management Studio Express in SQL Server? 1. Launch and connect SQ...
What Are the Differences between DATE and TIMESTAMP in Oracle? The main differences between DATE and...
What Happens to Your Transactions When ERROR 1205 Occurred in MySQL? If your transaction receives th...