title: Oracle INSERT INTO SELECT(...) DUP_VAL_ON_INDEX exception behavior
body: <p>I have a stored procedure which looks like this:</p>
  
  <pre><code>BEGIN
    INSERT INTO result_table
    (SELECT (...) FROM query_table);
  EXCEPTION
    WHEN DUP_VAL_ON_INDEX THEN
      NULL;
  END;
  </code></pre>
  
  <p>I'm doing it in a loop which passes multiple parameters to the SELECT statement and in some cases some of the values might duplicate that is why I have to catch the DUP_VAL_ON_INDEX exception.</p>
  
  <p>My question is that if the SELECT statement returns more rows and only one from them exists already in *result_table*, f. ex.</p>
  
  <pre><code>1 'A'
  2 'B'
  3 'C'
  </code></pre>
  
  <p>And first row (1 'A') would already be in the table, would other rows which don't exist (second and third from case above) be inserted? Or none of them would be inserted at all? </p>
  
  <p>I'm afraid that none of them would be inserted (and my test case partially confirms that)... If so, what option do I have to achieve desired bahavior? Is there a good way to insert the rows that don't violate the primary key using the construction above?</p>