CREATE OR REPLACE PROCEDURE create_new_user (usernm IN VARCHAR2, passwd IN VARCHAR2) AS sql_stmt VARCHAR2(100); BEGIN sql_stmt := 'CREATE USER '||usernm||' IDENTIFIED BY '||passwd EXECUTE IMMEDIATE sql_stmt; END; /Now that you have the procedure defined, you can call it in your application, passing the username and passwords as parameters.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.