title: How to create a table inside of a procedure in Oracle?
body: <p>I want to create a table inside of a procedure. I tried to put the create query in a string then execute immediate the string. For example:</p>
  <pre><code>create or replace procedure hr.temp is
     var1 varchar2(4000);
  begin
     var1:='create table hr.temp(
            id number)';
     execute immediate var1;
  end temp;
  </code></pre>
  <p>But when I execute this procedure I get the error:</p>
  <blockquote>
  <p>ORA-00911: invalid character<br />
  ORA-06512: at &quot;SYS.TEMP&quot;, line 6<br />
  .<br />
  .<br />
  .</p>
  </blockquote>
  <p>Is there any way I can do this?</p>