当QUOTE()
函数与WHERE子句一起使用时,输出取决于WHERE子句返回的比较值。以下示例将展示它-
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)