📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

QUOTE



Quotes a string to produce a result that can be used as a properly escaped data value in an SQL statement.

Syntax

QUOTE(<str>)

Examples

SELECT QUOTE('Don\'t!'); +-----------------+ | QUOTE('Don't!') | +-----------------+ | Don\'t! | +-----------------+ SELECT QUOTE(NULL); +-------------+ | QUOTE(NULL) | +-------------+ | NULL | +-------------+

Was this page helpful?