Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to update each row of a oracle table based on another table's rows. To be more specific, There's a table called Contact with the following fields:

 code(PK), name, mobile, email

There's also another table called Contact_Updated with same fields. The question is how to update Contact records with their equivalent in Contact_Updated table?

any idea?

share|improve this question
up vote 1 down vote accepted

Something along the lines of:

MERGE INTO Contact a
  USING Contact_Updated b
    ON (a.code = b.code)
  WHEN MATCHED THEN  /* no NOT MATCHED clause, so no inserts, update only */
    UPDATE SET =,,;
share|improve this answer
Thanks kubanczyk, it worked! – Mehdi Es-haghi Feb 11 '12 at 5:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.