MySQL QUOTE() 函数如何用在比较值中?
当 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)
广告