mysql update data from different tables

Brother, you were a person who played orcl before me. So generally updating data from a table a to table b is update bb set b.aaa = (select a.aaa where a.id = a) where exists (select a.aaa where a.id = a). This way of writing is that the keyword that comes with orcl has a matching function. Can be achieved

   But mysql does not work. So another method was used. It is update followed by multiple tables

update bb, aa set b.aaa = a.aaa where b.bbb = a.bbb is more intuitive and easier to understand.

Seems to be more thought in the future. Think a little more to make great progress.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325451865&siteId=291194637
Recommended