Procedure [message #812] |
Tue, 05 March 2002 20:05 |
Amita Kapadia
Messages: 8 Registered: January 2002
|
Junior Member |
|
|
Dear All,
Can you tell me how to create user from procedure or through database trigger.(trigger on insert,for each row). this being ddl command gives error like
PLS-00103 Encountered symbol "Create" when expecting .....
Amita
|
|
|
Re: Procedure [message #813 is a reply to message #812] |
Tue, 05 March 2002 21:42 |
seng
Messages: 191 Registered: February 2002
|
Senior Member |
|
|
In Procedure,Package, Function and Trigger, only DML is allowed to use. So you will get the error when DDL is used.
But you can use this Oracle package(DBMS_SQL) to use DML and DDL in PL/SQL.
Hope this is helping. Thank
|
|
|
Re: Procedure [message #841 is a reply to message #812] |
Thu, 07 March 2002 11:01 |
Suresh Vemulapalli
Messages: 624 Registered: August 2000
|
Senior Member |
|
|
ddl commands are not allowed in triggers except if u use autonomous transactions.
here is an example to create user from procedure
create or replace procedure p1 is
begin
execute immediate 'create user u1 identified by u1';
end;
/
|
|
|