0

別のテーブル値から値を更新したい これは私のコードです

UPDATE 
ag_personal_information 
SET
ag_personal_information.ag_zone_id = 
  (SELECT ag_officer_service_information.ag_zone_id 
                  FROM ag_officer_service_information) 
WHERE
ag_officer_service_information.ag_zone_id <> ag_personal_information.ag_zone_id
4

2 に答える 2

1

これを試して

UPDATE ag_personal_information AS A 
SET ag_personal_information.ag_zone_id = (
            SELECT ag_officer_service_information.ag_zone_id 
            FROM ag_officer_service_information AS B 
            WHERE A.ag_officer_service_information.ag_zone_id <> B.ag_personal_information.ag_zone_id) 
于 2013-07-19T07:06:17.550 に答える