错误内容如下:
Compilation errors for PACKAGE BODY PROJECT.PUSERError: PLS-00103: 出现符号 "CREATE"在需要下列之一时:
begindeclareexitforgoto
ifloopmodnullpragmaraisereturnselectupdatewhile
<an identifier><a double-quoted delimited-identifier>
<a bind variable><<closecurrentdeletefetchlockinsertopen
rollbacksavepointsetsqlexecutecommitforall
<a single-quoted SQL string>
Line: 31
Text: create user p_Account identified by p_Account
Compilation errors for PACKAGE BODY PROJECT.PUSERError: PLS-00103: 出现符号 "CREATE"在需要下列之一时:
begindeclareexitforgoto
ifloopmodnullpragmaraisereturnselectupdatewhile
<an identifier><a double-quoted delimited-identifier>
<a bind variable><<closecurrentdeletefetchlockinsertopen
rollbacksavepointsetsqlexecutecommitforall
<a single-quoted SQL string>
Line: 31
Text: create user p_Account identified by p_Account
insert update delete等是数据操纵语言(dml)ddl在pl/sql中需要动态的sql语句来实现如直接:create user identified by user;
create or replace procedure name_pro
as
str varchar2(60);
begin
str:='create user user_name identified by pass_name
default tablespace space_name
temporary tablespace tmp_name';
execute immediate str;
end;
/