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

The method of increasing the original value of mysql

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

Share

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

This article mainly introduces the method of increasing the original value of mysql, which is introduced in great detail and has a certain reference value. Interested friends must finish reading it!

The method to increase the original value of mysql: use the updata function in the format of [update table name set field name = field name + 1 [where statement]].

The method of increasing the original value of mysql:

Format:

Update table name set field name = field name + 1 [where statement]

For example, there is a student table in the database. If you want to add a score to a student whose id is 1,

Update student set score=score+1 where id = 1

If you don't add the where system, you won't know exactly which record you want to update, resulting in an increase of 1 in all the score in the table, unless, of course, that's what you mean.

The above is all the contents of the method of increasing the original value of mysql, thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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