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)
Linux uses iftop to monitor the traffic of the ne...
The dd and dt tags are used for lists. We usually...
This article example shares the specific code of ...
Table of contents 1.Linux login interface 2. Writ...
In many cases, in order to beautify the form, the ...
This article shares the specific code for using j...
Introduction Because JavaScript is single-threade...
There is no mysql by default in the yum source of...
This article example shares the specific code of ...
Recently, I have been working on a project and ne...
recommend: Navicat for MySQL 15 Registration and ...
This article example shares the specific code of ...
1. Differences in network configuration between C...
Using ajax to implement form submission without re...
Six steps to install MySQL (only the installation...