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

A simple method to modify the score in the middle of a field in mysql

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

Share

Shulou(Shulou.com)06/01 Report--

Next, let's learn about the simple way to modify the score in the middle of the field in mysql. I believe you will benefit a lot after reading it. The text is not much in essence. I hope that the simple way to modify the score in the middle of the field in mysql is what you want.

If you encounter a small requirement, you want to modify the score in the middle of the field. Replace in mysql can be implemented.

Mysql > select * from syk_test +-+ | user | host | +-+-+ | repluser |% | syk |% | mysql.sys | localhost | | root | localhost | +-+-+ 4 rows in set (0.00 sec) ) mysql > update syk_test set host = replace (host 'local','my') Query OK, 2 rows affected (0.00 sec) Rows matched: 4 Changed: 2 Warnings: 0mysql > select * from syk_test +-+-+ | user | host | +-+-+ | repluser |% | syk |% | mysql.sys | myhost | | root | myhost | +-+-+ 4 rows in set (0.00 sec)

Replace (object, search,replace) replaces all search in object with replace.

After reading this article, many readers will want to know more about it. If you want to get more industry information, you can follow our industry information section.

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