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)
routing vue-router4 keeps most of the API unchang...
nohup command: If you are running a process and y...
An application of CSS animation, with the same co...
First and foremost, I am a web designer. To be mor...
Environmental Description: There is a running MyS...
Possible solutions 1. Math.random generates rando...
Find mirror We can search for images from the Doc...
Recently, when I was doing a practice project, I ...
Even though it's not Halloween, it's wort...
Table of contents Creating HTML Pages Implement t...
Three ways to set borders in HTML border-width: 1...
Table of contents WebAPI DOM DOM Tree DOM element...
Copy code The code is as follows: <!DOCTYPE ht...
1. Check the currently installed PHP packages yum...
Look at the code first Copy code The code is as fo...