title: Oracle Pl SQL, conditional in UPDATE statement
body: <p>I want to create a stored procedure that's flexible in handling an update on multiple columns for a table, but where all or some of the values may or may not be provided.</p>
  
  <p>Something like this for instance:</p>
  
  <pre><code>UPDATE some_table
  SET
  
  IF(I_COLUMN_1 is not NULL) THEN
     COLUMN_1 = I_COLUMN_1
  END IF;
  
  IF(I_COLUMN_2 is not NULL) THEN
     COLUMN_2 = I_COLUMN_2
  END IF;
  
  WHERE
  SOME_KEY = I_SOME_KEY;
  </code></pre>
  
  <p>Obviously not right, but just to give you some pseudo code to portray my idea.</p>
  
  <p>The only way i can think to do this now, is check for each variable, and run a separate update statement for each column which feels really lame.</p>