title: How can I write a PL/SQL procedure to copy tables and contents from another account
body: <p>I need to write a PL/SQL procedure to create tables that match the ones in another account(I have access to that account). They need to have same columns and types. Also, they need to be filled with the same data </p>
  
  <p>Help me! </p>
  
  <p>EDIT:</p>
  
  <pre><code>SQL&gt; CREATE OR REPLACE PROCEDURE MakeTables
    2  AS
    3  BEGIN
    4  EXECUTE IMMEDIATE
    5  'CREATE TABLE Table1 AS (SELECT * FROM ANOTHER_ACCT.Table1);
    6  CREATE TABLE Table2 AS (SELECT * FROM ANOTHER_ACCT.Table2);
    7  CREATE TABLE Table3 AS (SELECT * FROM ANOTHER_ACCT.Table3);
    8  CREATE TABLE Table4 AS (SELECT * FROM ANOTHER_ACCT.Table4)';
    9  END;
   10  /
  
  Procedure created.
  </code></pre>
  
  <p>But when I run this I get this error:</p>
  
  <pre><code>SQL&gt; BEGIN
    2  MakeTables;
    3  END;
    4  /
  BEGIN
  *
  ERROR at line 1:
  ORA-00911: invalid character
  ORA-06512: at "BS135.MAKETABLES", line 4
  ORA-06512: at line 2
  </code></pre>