我有两张桌子
   
    A和B
   
   具有以下字段:
  
  
   
    表A
   
  
  | ID | COUNTRY_CODE | COUNTRY_NAME | FIRST_NAME | LAST_NAME |
  
   
    表B
   
  
  | ID | COUNTRY_CODE | COUNTRY_NAME |
  
   现在我需要更新
   
    国家代码
   
   字段来自
   
    表A
   
   要从中获取其值的
   
    表B
   
   .
  
  
   伪代码如下:
  
  for all rows in Table A :
  set A.country_code = (select B.country_code from B where B.country_name = A.country_name