String Functions MySQL Tutorial

If the argument is NULL, the return value is the word "NULL" without enclosing single quotes.

mysql>
mysql> SELECT QUOTE('Don\'t!');
+------------------+
| QUOTE('Don\'t!') |
+------------------+
| 'Don\'t!'        |
+------------------+
1 row in set (0.00 sec)
mysql>