1. Single table query -> update UPDATE table_name SET field1=new-value1, field2=new-value2 [WHERE Clause] 2. Multi-table joint query -> update UPDATE a INNER JOIN (SELECT yy FROM b) c ON a.id = c.id SET a.xx = c.yy [WHERE Clause]
example: tableex_copy1 table tablein_copy1 table Query SQL SELECT * FROM tableex_copy1 a LEFT JOIN (SELECT * FROM tablein_copy1) b ON a.BID = b.AID WHERE b.ASEX = 'female' update SQL UPDATE #SELECT * FROM tableex_copy1 a LEFT JOIN (SELECT * FROM tablein_copy1) b ON a.BID = b.AID SET a.CESHI = '6666' WHERE b.ASEX = 'female' Tableex_copy1 table after update Summarize This is the end of this article about MySQL executing update on select results. For more relevant content about MySQL executing update on select results, please search previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: HTML table tag tutorial (17): table title vertical alignment attribute VALIGN
>>: Front-end state management (Part 2)
First, I will give you the VMware 14 activation c...
Table of contents 1. Problem Description 2. Cause...
How to write Vue foreach array and traverse array...
With the popularization of 3G, more and more peop...
MySQL 8.0: MVCC for Large Objects in InnoDB In th...
Table of contents Introduction What does an itera...
mistake The following error occurs when connectin...
CocosCreator version: 2.3.4 Cocos does not have a...
Solve the problem of Chinese garbled characters i...
Table of contents need Get data and submit Templa...
This article example shares the specific code of ...
There are two ways to run .sh files in Linux syst...
Table of contents 1. Write Webshell into outfile ...
1. Download First of all, I would like to recomme...
download MySQL official download, select Windows ...