错误内容如下:
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

解决方案 »

  1.   

    在PL/SQL中要使用DDL语句,需要用动态SQL语句来实现,并且要拥有创建用户的权限
      

  2.   

    create drop等是数据定义语言(dll)
    insert update delete等是数据操纵语言(dml)ddl在pl/sql中需要动态的sql语句来实现如直接:create user identified by user;
      

  3.   

    当有用户要有create any 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;
    /
      

  4.   

    在Procedure中实现这种功能!就要使用动态sql,就如楼上所说!如果你的oracle的版本不是8i以上的话!就用dbms_sql包来实现!