How to accumulate mysql

Source: Internet
Author: User
How to accumulate mysql data? For example, if I have a value of 897, MYSQL adds 763 & nbsp; if the final result is 897 + 763, is it necessary to first access MYSQL to get 897 and then add 763 to write to MYSQL? what I want now is & nbsp; is there a need to get 897 first and write 763 directly, but the write value is 897 + 763, which means you want to accumulate less access to MYSQL?
For example, now I have a value of 897 in MYSQL.
New users will eventually get 763 + 897

Is it necessary to access MYSQL first to get 897 and then add 763

Write to MYSQL

What I want now is whether the write value is 897 + 763 instead of getting 897 and writing 763 directly.

That is, you want to access MYSQL only once.

MySQL

Share:


------ Solution --------------------

This post was last edited by xuzuning at 11:28:43

If it is a numeric value
Updatetbl_name set field_name = maid + 763
Field_name changed to 1660

If it is a string
Updatetbl_name set field_name = concat (field_name, '20140901 ')
Field_name changed to 897763

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.