How does MySQL QUOTE() function work with comparison values?

MySQLMySQLi Database

When QUOTE() function used with WHERE clause then the output depends upon the comparison values returned by WHERE clause. Following example will exhibit it −

Example

mysql> Select Name, ID, QUOTE(Subject)AS Subject from Student WHERE Subject = 'History';

+-------+------+-----------+
| Name  | ID   | Subject   |
+-------+------+-----------+
| Aarav | 2    | 'History' |
+-------+------+-----------+

1 row in set (0.00 sec)
raja
Published on 20-Feb-2018 10:38:27
Advertisements