Home > database >  Update the set the subquery multiple fields
Update the set the subquery multiple fields

Time:09-26

At present is

Update A column set A=(1 from the select column B where * * * * linmt 1)

I want to update multiple fields at the same time

Similar to select A set column A and column B=(select A1, A2 from linmt 1 B)

Cannot be used because the join two tables is time sequence correlation, there is no unique key to associate queries,

Check the night information, like mysql didn't support this way, must link or update a few fields, write a second query

The last hope here with great god give directions

CodePudding user response:


Update A, (the select A1, A2 from B linmt 1) c
The set a. column A=1, c.a. a. column=c.a. 2 B
  • Related