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"***** |
+------+--------------------------------------+
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30162734/viewspace-2152774/
,如需转载,请注明出处,否则将追究法律责任。