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, 1280🔥, 0💬
Popular Posts:
How Fixed Length Strings Are Truncated and Padded in SQL Server Transact-SQL? When the length of the...
What Is Transport Network Substrate (TNS) in Oracle? TNS, Transport Network Substrate, is a foundati...
How To Download Oracle Database 10g XE in Oracle? If you want to download a copy of Oracle Database ...
How To Replace Given Values with NULL using NULLIF() in SQL Server Transact-SQL? Sometime you want t...
What Is Transport Network Substrate (TNS) in Oracle? TNS, Transport Network Substrate, is a foundati...