title: Create table as select statement using procedure
body: <p>first of all i have 3 schema as follow ( MEDICINE, MEDICINE1 ,MEDICINE2) .
  <strong>MEDICINE</strong> and <strong>MEDICINE1</strong> have same tables, <strong>MEDICINE</strong> have updated data and <strong>MEDICINE1</strong> have old data. and i have <strong>MEDICINE2</strong> with no tables so i want to create table in <strong>MEDICINE2</strong> as select from <strong>MEDICINE</strong> where not in <strong>MEDICINE1</strong>.</p>
  
  <p>Ex. <code>create MEDICINE2.table1 as ( select * from MEDICINE.table1 minus select * MEDICINE1.table1 )</code>
  so if table1 in schema MEDICINE has data (1,2,3,4,5,6) and MEDICINE1 has (1,2,3,4) so table1 will create in MEDICINE2 with data (5,6)</p>
  
  <p>because i have many tables, i create this procedure :</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE SYSTEM.create_table_from_schema IS
   TYPE own_array IS TABLE OF VARCHAR2(40)
      INDEX BY binary_integer;
   TYPE tab_array IS TABLE OF VARCHAR2(40)
      INDEX BY binary_integer;
    v_dml_str VARCHAR2 (400);
    v_own_array    own_array;
    v_tab_array    tab_array;
  BEGIN
  
    SELECT owner,table_name,BULK COLLECT
      INTO v_own_array,v_tab_array
      from SYS.all_tables  
    where global_stats='YES'
    And owner = 'MEDICINE';
  
  
    FOR i IN v_tab_array.first..v_tab_array.last LOOP
      v_dml_str := 'Create table MEDICINE2.'
                   ||v_tab_array(i)||'as (select * from '||v_own_array(i)||'.'|| v_tab_array(i)
                   ||' minus select * from MEDICINE1.'|| v_tab_array(i)||' )'  ;             
      EXECUTE IMMEDIATE v_dml_str;
    END LOOP;
  END;
  /
  </code></pre>
  
  <p>but there is error will show </p>
  
  <blockquote>
    <p>PROCEDURE SYSTEM.CREATE_TABLE_FROM_SCHEMA On line:  11 PL/SQL:
    ORA-00904: "BULK": invalid identifier</p>
  </blockquote>
  
  <p><strong>Are there errors in procedure  ?</strong></p>
  
  <p>thanks and regard,</p>