这篇文章主要介绍“怎么解决mysql表中字段插入含有特殊符号的内容”,在日常操作中,相信很多人在怎么解决mysql表中字段插入含有特殊符号的内容问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”怎么解决mysql表中字段插入含有特殊符号的内容”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
mysql 表中字段插入含有特殊符号:
insert into a values(3,\[\["1312","1321"\]\]);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1312","1321"\]\]")' at line 1
解决方法:加单引号
insert into a values(4,'[["1312","1313","1314"]]');
insert into a values(4,'***********"1312","1313","1314"*****');
select * from a;
+------+--------------------------------------+
| id | name |
+------+--------------------------------------+
| 2 | game2 |
| 4 | [["1312","1313","1314"]] |
| 4 | ***********"1312","1313","1314"***** |
+------+--------------------------------------+
到此,关于“怎么解决mysql表中字段插入含有特殊符号的内容”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!