Update multiple table column values using single query

Posted by Dave Jarvis on Stack Overflow See other posts from Stack Overflow or by Dave Jarvis
Published on 2010-04-22T23:00:37Z Indexed on 2010/04/22 23:03 UTC
Read the original article Hit count: 230

Filed under:
|
|

How would you update data in multiple tables using a single query? In MySQL it would be:

UPDATE party p
LEFT JOIN party_name n ON p.party_id = n.party_id
LEFT JOIN party_details d ON p.party_id = d.party_id
LEFT JOIN incident_participant ip ON ip.party_id = p.party_id
LEFT JOIN incident i ON ip.incident_id = i.incident_id
SET
  p.employee_id = NULL,
  c.em_address = '[email protected]',
  c.ad_postal = 'x',
  n.first_name = 'x',
  n.last_name = 'x'
WHERE
  i.confidential_dt IS NOT NULL

What is the equivalent SQL statement using Oracle 11g? (Is ANSI SQL possible?)

Thank you!

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about oracle11g