In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following mainly brings you the specific writing of the mysql update statement, hoping that these contents can bring you practical use, which is also the main purpose of this article when I edit the specific writing of the mysql update statement. All right, don't talk too much nonsense, let's just read the following.
The update statement in MySQL is used to update existing data in the table. You can also use update statements to change the column values of a single row, a set of rows, or all rows in a table.
The syntax of the UPDATE statement in MySQL:
Single table
UPDATE [LOW_PRIORITY] [IGNORE] table_reference SET assignment_list [WHERE where_condition] [ORDER BY...] [LIMIT row_count] value: {expr | DEFAULT} assignment:col_name = valueassignment_list:assignment [, assignment].
Multi-meter
UPDATE [LOW_PRIORITY] [IGNORE] table_references SET assignment_list [WHERE where_condition]
One thing to note when updating a table with a UPDATE statement is:
The name of the table to update the data is specified after the UPDATE keyword.
The SET clause specifies the columns and new values to modify. To update multiple columns, use a comma-separated list.
Use the conditions in the where statement to specify the rows to update. The WHERE clause is optional. If you omit the WHERE clause, the UPDATE statement updates all rows in the table.
If the ORDER BY clause is specified, the rows are updated in the order specified.
The LIMIT clause is used to give a limit to the number of rows that can be updated.
ORDER BY and LIMIT cannot be used when multiple tables are updated.
When you use the update statement to modify the table:
Single table modification refers to modifying the value of one or more columns of existing data in a specified single table; the set phrase is followed by the column and value to be modified
The where clause defines which data in the table to modify. If there is no where clause, it means that all rows need to be modified.
The order by clause indicates that the update data is processed in the specified order
The limit clause indicates that the number of rows of modified data is limited
Multi-table modification refers to modifying the row data in multiple tables specified by table_references that meet the conditions. Order by and limit clauses are not allowed for multi-table modification.
For the above specific writing of the mysql update statement, we do not think it is very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.