报错如下: PLS-00103: 出现符号 "DROP"在需要下?
begincasedeclareexitfor
gotoifloopmodnullpragmaraisereturns
<an identifier><a double-quoted del
<a bind variable><<closecurrentdele
rollbacksavepointsetsqlexecutecommi
<a single-quoted SQL string>pipe PLS-00103: 出现符号 "CREATE"在需要下列之一时:
begincasedeclareexitfor
gotoifloopmodnullpragmaraisereturnselectupdatewhilewith
<an identifier><a double-quoted delimited-identifier>
<a bind variable><<closecurrentdeletefetchlockinsertopen
rollbacksavepointsetsqlexecutecommitforallmerge
<a single-quoted SQL string>pipe
begincasedeclareexitfor
gotoifloopmodnullpragmaraisereturns
<an identifier><a double-quoted del
<a bind variable><<closecurrentdele
rollbacksavepointsetsqlexecutecommi
<a single-quoted SQL string>pipe PLS-00103: 出现符号 "CREATE"在需要下列之一时:
begincasedeclareexitfor
gotoifloopmodnullpragmaraisereturnselectupdatewhilewith
<an identifier><a double-quoted delimited-identifier>
<a bind variable><<closecurrentdeletefetchlockinsertopen
rollbacksavepointsetsqlexecutecommitforallmerge
<a single-quoted SQL string>pipe
sql string(1000);
...
begin
sql:='create ...';
execute immediate sql;
再次要对应drop any table,create any table权限
直接在psql里写的话,当然可以;
但是根据你的报错应该是在模块里写的,模块里当然不能出现如此的语法
应该让它转化成变量的形式,也就是调用动态sql来执行ddl,比方说:
--申明变量
declare
sSql varchar2(100);
……
begin
……
sSql :="sql statement";
execute immediate sSql;
……
end;