I have two table let's name A and B having following field :
TABLE A
| ID | COUNTRY_CODE | COUNTRY_NAME | FIRST_NAME | LAST_NAME |
TABLE B
| ID | COUNTRY_CODE | COUNTRY_NAME |
Now I need to update country_code field from Table A whose value is to be fetched from Table B.
The pseudo-code is something like this :
for all rows in Table A :
set A.country_code = (select B.country_code from B where B.country_name = A.country_name