Home » SQL & PL/SQL » SQL & PL/SQL » Procedure
Procedure [message #812] Tue, 05 March 2002 20:05 Go to next message
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 .....

Re: Procedure [message #813 is a reply to message #812] Tue, 05 March 2002 21:42 Go to previous messageGo to next message
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 Go to previous message
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

execute immediate 'create user u1 identified by u1';
Previous Topic: Database Triggers
Next Topic: Compute
Goto Forum:

Current Time: Wed Oct 20 18:01:16 CDT 2021