Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Create table problem using Dynamic Query
Hi all,
I want to create a temporary table within a stored procedure so I decided to
do it using a dynamic query:
[CODE]create or replace procedure p1
as
begin
execute immediate 'CREATE GLOBAL TEMPORARY TABLE tt(id number(2))';
end;
/[/CODE] It created successfuly but when I execute that procedure I got:[CODE]
SQL> exec p1;
BEGIN p1; END;
*
ERROR at line 1:
ORA-01031: insufficient privileges ORA-06512: at "SCOTT.P1", line 4 ORA-06512: at line 1[/CODE] While I can create that table using the same userwithout any problem!
-- Message posted via DBMonster.com http://www.dbmonster.com/Uwe/Forums.aspx/oracle/200509/1Received on Mon Sep 05 2005 - 04:22:59 CDT