title: Stored Procedure Insert (Select and Values)
body: <p>I'm looking to have a stored procedure that will:</p>
  
  <ul>
  <li>run through Table A and retrieve all IDs.</li>
  <li>insert into Table B all IDs (loop) but also static values which aren't found in Table A.</li>
  </ul>
  
  <p>How do I approach this?</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE TEST AS 
  BEGIN
  
  select ID from TABLE A;
  
  
  INSERT INTO TABLE B
      (
      created_date,
      created_by,
      ID
      )
  VALUES ('sysdate', '1', 'RESULTS FROM SELECT QUERY');
  END TEST;
  </code></pre>
  
  <p>Not sure how to merge static data ('sysdate' and '1') with results from a query.</p>