title: How to Know if the query is executed successfully in PLSQL
body: <p>In my function, I have an INSERT through a Select..</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION INSERT_DATA
  RETURN VARCHAR2
  AS
  BEGIN
    INSERT INTO T_ITEMS (cd_1,cd_2,cd_3) 
      (SELECT cd_1,cd_2,cd_3 FROM REC_ITEMS);
    COMMIT;
    RETURN 'Return 1 if All is OK else return 0';
  END;
  </code></pre>
  
  <p>How do I know that my INSERT has passed and all lines are recorded successfully?</p>
  
  <p>My function should return 1 if everything is OK otherwise return 0.</p>