Link to home
Start Free TrialLog in
Avatar of n00b0101
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?
ASKER CERTIFIED SOLUTION
Avatar of theGhost_k8
theGhost_k8
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial