title: Requirement in Oracle PL/SQL to update labels
body: <p>I have 2 tables - tab1 , tab2 with following data</p>
  <pre><code>tab1 data:
  OID   Label
  1     MX1
  1     MX2
  1     MX3
  2     MX4
  2     MX5
  
  
  tab2 data:
  OID  ID    Label
  1    5678
  1    2347
  1    9687
  2    4567
  2    3455
  </code></pre>
  <p>The join condition between these two tables is oid column.I need to create a process which will update Label column from tab1 to Label column of tab2.It doesn't matter which label gets assigned to which record of tab2 for a particular oid. The only check that needs to happen is that both the tables should have same number of records for an oid.The final outcome should be the following</p>
  <pre><code>tab2 data:
  OID  ID    Label
  1    5678  MX1
  1    2347  MX2
  1    9687  MX3
  2    4567  MX4
  2    3455  MX5
  </code></pre>
  <p>Again, it doesn't matter which label gets assigned to tab2 for a particular oid,but the same label cannot be repeated for a particular oid.What would be the best way to write a code for this requirement?</p>