title: How to delete and insert data into a same table in stored procedure?
body: <p>How can I do a delete for a table in a stored procedure before inserting data into the table?</p>
  
  <pre><code>create or replace procedure proc_test is
  begin
  delete * from table1
  
  insert into table1
  select * from table2
  end proc_test;
  </code></pre>
  
  <p>Does does not seem to work, what is wrong with the syntax? The error is</p>
  
  <pre><code>ERROR at line 8: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
  
     begin case declare end exception exit for goto if loop mod
     null pragma raise return select update while with
  
      &lt;&lt; close current delete fetch lock insert
     open rollback savepoint set sql execute commit forall merge
     pipe
  6. select * from table1
  7. 
  8. end proc_test;
  </code></pre>