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 insert special characters in MySQL

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly explains "how to insert special characters in MySQL". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to insert special characters in MySQL.

Sometimes when you insert a character, you often find', "it's hard to insert. It's OK in MYSQL.

Examples are as follows:

Mysql > create table new (name varchar)

Query OK, 0 rows affected (0.00 sec)

Mysql > insert into new values ('wt's test')

'>

'>

'>'

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's test')

'' at line 1

Mysql > insert into new values ('wt's test')

Query OK, 1 row affected (0.00 sec)

Mysql >

Mysql > insert into new values ('wt "s test')

Query OK, 1 row affected (0.00 sec)

Mysql > select * from new

+-+

| | name |

+-+

| | wt's test |

| | wt "s test |

+-+

2 rows in set (0.00 sec)

At this point, I believe you have a deeper understanding of "how to insert special characters in MySQL". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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