what is oracle update statement with inner join ?

Answer

UPDATE table1 SET table1.value =(SELECT table2.CODE
                                  FROM table2 
                                  WHERE table1.value = table2.DESC)WHERE table1.UPDATETYPE='blah'ANDEXISTS(SELECT table2.CODE
            FROM table2 
            WHERE table1.value = table2.DESC);

Or you might be able to do this:

UPDATE(SELECT table1.value as OLD, table2.CODE as NEW
 FROM table1
 INNERJOIN table2
 ON table1.value = table2.DESCWHERE table1.UPDATETYPE='blah') t
SET t.OLD = t.NEW

All oracle Questions

Ask your interview questions on oracle

Write Your comment or Questions if you want the answers on oracle from oracle Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---