Home » SQL & PL/SQL » SQL & PL/SQL » a simple question
a simple question [message #3060] Mon, 02 September 2002 22:55 Go to next message
oranew
Messages: 6
Registered: January 2002
Junior Member
Hi,

could anyone explain why DDL can not be used directly in PL/SQL procedure? Thanks a lot in advance.
Re: a simple question [message #3065 is a reply to message #3060] Tue, 03 September 2002 00:24 Go to previous messageGo to next message
neetu
Messages: 2
Registered: September 2002
Junior Member
hi
plz explain me the internal archieture of database.
plz give me the details ofconcetual model?????
also give me the previous paper of ocp.
Re: a simple question [message #3076 is a reply to message #3060] Tue, 03 September 2002 04:59 Go to previous message
Christine Pollhaus
Messages: 18
Registered: May 2002
Junior Member
Hi oranew,

it can indeed:

For example: automatically create a new user like I did:

CREATE OR REPLACE
PROCEDURE NEWUSER (user_in IN CHAR, pw_in IN CHAR)
IS
BEGIN
EXECUTE IMMEDIATE
'CREATE USER '||user_in||' IDENTIFIED BY '||pw_in||' DEFAULT TABLESPACE <type tablespacename here> TEMPORARY TABLESPACE <type tablespacename here> ';
EXECUTE IMMEDIATE
'GRANT <type grant or rolename here> TO '||user_in||' ';
End;

But: Attention: please don't forget to give create user privilege, grant privilege and grant any role privilege (if neccessary) to the user who owns and executes this procedure!
hope it helps ! Greetings!
Previous Topic: autonomous_transaction
Next Topic: Help With 5 Questions
Goto Forum:
  


Current Time: Fri Apr 19 02:11:22 CDT 2024