Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of inserting fields with special symbols in mysql table

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to solve the problem of inserting fields containing special symbols in the mysql table". In the daily operation, I believe that many people have doubts about how to solve the problem of inserting fields containing special symbols in the mysql table. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts of "how to solve the problem of inserting fields containing special symbols in the mysql table". Next, please follow the editor to study!

Field inserts in the mysql table contain special symbols:

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

Solution: add single quotation marks

Insert into a values (4Jing'["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" * |

+-- +

At this point, the study on "how to solve the problem of inserting fields with special symbols in the mysql table" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report