I have two tables as follows -
Room:
room | room_name | size | index (AI,pk)
0 | CR20 | 30 | 1
1 | CR30 | 40 | 2
Enroll:
...| room | size | index(AI, pk)
| 0 | | 1
| 1 | | 2
| 0 | | 3
| 1 | | 4
I wish to update the table Enroll, where Enroll.room is assigned the respective room_name from table Room. i.e. all the 0's and 1's in field room from Enroll will change to CR20 or CR30 and the size values will be filled in respectively.
What MySQL query would be suitable for this? Any help would be appreciated.