title: Non-key-preserved table error for update with unique data
body: <p>I am confused about key preserved join view update in Oracle (and in general); when doing an update using a select with a join, whether the key preserved property is expected for the table that is updated or for the embedded select statement.</p>
  
  <p>In the below example:</p>
  
  <pre><code>SQL&gt; create table tabX (x1 number, x2 number);
  
  Table created.
  
  SQL&gt;  create table tabY (y1 number, y2 number);
  
  Table created.
  
  SQL&gt; insert into tabx values (1,11);
  
  1 row created.
  
  SQL&gt; insert into tabx values (2,12);
  
  1 row created.
  
  SQL&gt; insert into taby values(1,21);
  
  1 row created.
  
  SQL&gt;  insert into taby values(2,22);
  
  1 row created.
  
  SQL&gt; commit;
  
  Commit complete.
  </code></pre>
  
  <p>the output of select is unique but still the update fails. There is no ambiguity or duplication in both select and update - so why does it fail?</p>
  
  <pre><code>SQL&gt; select x2,y2 from tabx,taby where tabx.x1=taby.y1;
  
          X2         Y2
  ---------- ----------
          11         21
          12         22
  
  SQL&gt; update (select x2,y2 from tabx,taby where tabx.x1=taby.y1) set x2=y2;
  update (select x2,y2 from tabx,taby where tabx.x1=taby.y1) set x2=y2
                                                             *
  ERROR at line 1:
  ORA-01779: cannot modify a column which maps to a non key-preserved table
  </code></pre>