我有 3 个表,说RELATIONS,PERSON,COMPANY
我需要通过加入这 3 个表来UPDATE
active_flag
字段。我的要求是PERSON
'I'/'A'
UPDATE PERSON p
SET p.active_flag ='I'
FROM PERSON p,RELATIONS r,COMPANY c
WHERE p.email ='email@gmail.com'
AND c.rel_id = r.id
AND r.dep_id = '1234567'
AND r.book_id = '1234567'
我怎样才能做到这一点??