MySQL Tutorial/String Functions/QUOTE
QUOTE(NULL);
<source lang="sql">
mysql> mysql> SELECT QUOTE(NULL); +-------------+ | QUOTE(NULL) | +-------------+ | NULL | +-------------+ 1 row in set (0.00 sec) mysql> mysql></source>
QUOTE(str): Quote(str) produce a result that can be used as a properly escaped data value in an SQL statement
If the argument is NULL, the return value is the word "NULL" without enclosing single quotes.
<source lang="sql">
mysql> mysql> mysql> SELECT QUOTE("Don\"t!"); +------------------+ | QUOTE("Don\"t!") | +------------------+ | "Don\"t!" | +------------------+ 1 row in set (0.00 sec) mysql></source>