Home > database > Help: how to use the table A row data update table B A row data
Help: how to use the table A row data update table B A row data
Time:09-30
For example there are three rows of data in table A:
There are 2 rows of data in table B:
Now how to use the line 2 in table A data update line 1 in table B, other data unchanged line
CodePudding user response:
- about this The update B B.B set (b.X M, H)=(select A.X M, a. H from A where Anderson, D=B.I D) Where the exists (select * from A where Anderson, D=B.I D)
CodePudding user response:
UPDATE BSET (XH, XM)=(//the other fields to omit The SELECT XH, XM FROM A WHERE ID=40049 a ) WHERE ID=5 ec18c