quote(str) 是 MySQL 的一个 字符串 函数。此方法返回用单引号转义的字符串。
语法
select quote(str);
示例 1
select quote('yxjc123 is a website');
输出:
mysql> select quote('yxjc123 is a website');
+-------------------------------+
| quote('yxjc123 is a website') |
+-------------------------------+
| 'yxjc123 is a website' |
+-------------------------------+
1 row in set (0.00 sec)
示例 2
select quote('mysql String function');
输出:
mysql> select quote('mysql String function');
+--------------------------------+
| quote('mysql String function') |
+--------------------------------+
| 'mysql String function' |
+--------------------------------+
1 row in set (0.00 sec)