The implementation method of mysql batch update and batch update of different values of multiple records, mysql multiple
Batch update
The mysql update statement is simple. to update a field of a piece of data, write as follows:
The Code is as
Execute an SQL query and UPDATE multiple rows to record bitsCN.com
Execute an SQL query and UPDATE multiple rows of records
Generally, the following SQL statement is used to update the field value:
1
UPDATE mytable SET myfield = 'value' WHERE
Create a blog for mysql database, apacha server, and php Server
1. install mysql:
Prepare zip: mysql-5.5.33-linux2.6-x86_64.tar.gz
[Root @ www ~] # Groupadd-r mysql
[Root @ www ~] # Useradd-g mysql-r-s/sbin/nologin mysql
[Root @ www ~] # Id
In MySQL batch update we may use Update,replace into to operate, the following to give you detailed description of MySQL batch update and performance bar!MySQL UPDATE statement is simple, update a field of the data, generally write:Copy the Code
Implementation of different values for mysql batch update and batch update of multiple records bitsCN.com
Batch update
The mysql update statement is simple. to update a field of a piece of data, write as follows:
UPDATE mytable SET myfield = 'value'
Batch UpdateMySQL UPDATE statement is simple, update a field of the data, generally write:The code is as follows:UPDATE mytable SET myfield = ' value ' WHERE Other_field = ' other_value ';If you update the same field with the same value, MySQL is
Concrete Example 1. PHP Server ComponentsFor beginners, it is recommended to use the integrated server component, which already includes PHP, Apache, Mysql and other services, eliminating the time spent by developers in the tedious configuration
Batch Update
The MySQL UPDATE statement is simple, updating a field of data that is generally written like this:
The code is as follows
Copy Code
UPDATE mytable SET myfield = ' value ' WHERE Other_field = ' other_value '
mysql| Data | Database summary
In this chapter, we will focus on how to work with the MySQL database using Structured Query Language (SQL).
(2002-08-29-14:11:10)
--------------------------------------------------------------------------------
By
Batch update
The mysql update statement is simple. to update a field of a piece of data, write as follows:
Copy codeThe Code is as follows:UPDATE mytable SET myfield = 'value' WHERE other_field = 'other _ value ';
If the same field is updated to the
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.