MySQL QUOTE Function 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: 2020-06-20T10:42:27+05:30

116 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements