Create or replace procedure myprocedure
is
stmt varchar2(1000);
stmt2 varchar2(1000);
begin
stmt := 'create global temporary table temp(id number(10))';
execute immediate stmt;
stmt2 := 'insert into temp(id) values (10)';
execute immediate stmt2;
end;
when i execute the procedure
exec myprocedure;
i got the error:
ORA-01031: insufficient privileges
ORA-06512: at "I3.MYPROCEDURE", line 7
ORA-06512: at line 2