n00b0101
asked on
MySQL Update with data from another database/table?
I have two databases with the following content:
table a
id | x | code
1 | ABC | 14
2 | GHI | 34
3 | XYZ | 19
table b
id | M | code
1 | A2 |
3 | G8 |
5 | X0 |
I'm trying to update table b with the code for table for the records that have the same id, so I get:
id | M | code
1 | A2 | 14
3 | G8 | 19
5 | X0 |
Anyone know how to do that?
table a
id | x | code
1 | ABC | 14
2 | GHI | 34
3 | XYZ | 19
table b
id | M | code
1 | A2 |
3 | G8 |
5 | X0 |
I'm trying to update table b with the code for table for the records that have the same id, so I get:
id | M | code
1 | A2 | 14
3 | G8 | 19
5 | X0 |
Anyone know how to do that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.