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)
What does text-fill-color mean? Just from the lit...
This article mainly introduces the implementation...
1. Environmental Description (1) CentOS-7-x86_64,...
Table of contents Install vim plugin manager Add ...
The effect is very simple, just copy the following...
Table of contents 1minio is simple 2 Docker build...
XML Schema is an XML-based alternative to DTD. XM...
The dd and dt tags are used for lists. We usually...
There are two types of MySQL installation files, ...
1. Create a table CREATE TABLE `student` ( `id` i...
The questions encountered in Baidu interviews nee...
This article shares the specific code of React to...
We deal with Linux servers every day, especially ...
This article mainly introduces the pie chart data...
Table of contents What is the Observer Pattern? S...