title: How to merge two update query as a single update query in oracle?
body: <p>Table1 has id and ref_id as composite primary key Below given query updates 100 columns</p>
  
  <pre><code>Update table1 
  set contri_status = 0 
  where status = 1 
    and acc_dr_status = 1 
    and contri_status = 1 
    and id = '111';
  </code></pre>
  
  <p>Below given query Updates 3 columns</p>
  
  <pre><code>Update table1 
  set acc_dr_status = 50 
  where  status = 1 
    and acc_dr_status = 1 
    and contri_status = 0 
    and id = '111' 
    and ref_id in ('1','2','3');
  </code></pre>
  
  <p>I want single query to perform above both task so tried below given query</p>
  
  <pre><code>Update table1 
  set  contri_status = 0
     , acc_dr_status = 50    
  where status = 1 
    and acc_dr_status = 1 
    and contri_status = 1 
    and id = '111' 
    and ref_id in ('1','2','3');
  </code></pre>
  
  <p>Second updated query column contri_status is depent on first query updation.
  Rows modified by first are the only one going to be Modified by second query ( by first if 100 modified then by second it's going to 10 rows as i am using extra where ref_id in (...) Clause) .
  Single query to update should satisfy where clause condition of both primary up date queries</p>
  
  <p>Not getting proper result.</p>