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


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)

Updated on: 20-Jun-2020

73 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements