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, 1116🔥, 0💬
Popular Posts:
What are single-byte character string data types supported in SQL Server Transact-SQL? Single-byte c...
What Is an Oracle Instance in Oracle? Every running Oracle database is associated with an Oracle ins...
How To Look at the Current SQL*Plus System Settings in Oracle? If you want to see the current values...
How To Break Query Output into Pages in MySQL? If you have a query that returns hundreds of rows, an...
Where to find MySQL database server tutorials? Here is a collection of tutorials, tips and FAQs for ...