QUOTE(str)
Quotes function used to produce a result that can be used as a properly escaped data value in an SQL statement of a string. The string is returned enclosed by single quotation marks and with each instance of backslash (\), single quote ('), ASCII NUL, and Control+Z preceded by a backslash. QUOTE returns value is the word NULL, if the passed argument is NULL without enclosing single quotation marks.
Here is some example which will explain QUOTE function-
mysql> SELECT QUOTE('don\'t');
+-----------------+
| QUOTE('don\'t') |
+-----------------+
| 'don\'t' |
+-----------------+
1 row in set (0.00 sec)
mysql> SELECT QUOTE(NULL);
+-------------+
| QUOTE(NULL) |
+-------------+
| NULL |
+-------------+
1 row in set (0.00 sec)
0 Comment(s)