Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL query to update 1st table one column from another table

User_PT6OPOct 23 2012 — edited Oct 25 2012
hello all im trying to update one column of first table from other table column,

I am using below update command but its not considering the second condition i.e. a.column2<>b.column2


UPDATE table1 a SET a.column1 = (SELECT b.column1 FROM table2 b WHERE

a.column1=b.column1 AND a.column2<>b.column2) ;

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2012
Added on Oct 23 2012
6 comments
595 views