W
WTO_LOVER
Unregistered / Unconfirmed
GUEST, unregistred user!
create or replace procedure createtable_pro(tname in varchar2) is
nameindex number(5);
tablename varchar2(20);
sqltext varchar2(300);
begin
select dhd_seq.nextval into nameindex from dual;
tablename:=tname||to_char(nameindex);
sqltext:='create table '||tablename||' (dcid number(3),dcmc varchar2(40))';
execute immediate sqltext;
end createtable_pro;
==========================
CALL createtable_pro('AAAA');
---error----
ORA-01031: insufficient privileges
ORA-06512: at "PDA.CREATETABLE_PRO", line 9
ORA-06512: at line 1
我如何处里???????
nameindex number(5);
tablename varchar2(20);
sqltext varchar2(300);
begin
select dhd_seq.nextval into nameindex from dual;
tablename:=tname||to_char(nameindex);
sqltext:='create table '||tablename||' (dcid number(3),dcmc varchar2(40))';
execute immediate sqltext;
end createtable_pro;
==========================
CALL createtable_pro('AAAA');
---error----
ORA-01031: insufficient privileges
ORA-06512: at "PDA.CREATETABLE_PRO", line 9
ORA-06512: at line 1
我如何处里???????