Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Creating a user if it does not already exists using one SQL scrip

RE: Creating a user if it does not already exists using one SQL scrip

From: Thomas L. Harleman <tharleman_at_iquest.net>
Date: Sat, 1 Jul 2000 08:21:30 -0500
Message-Id: <10545.111055@fatcity.com>


You don't need to use PL/SQL at all. Just plain SQL will do if you're using SQL*Plus:

SELECT 'CREATE USER '||USERNAME||' IDENTIFIED BY PASSWORD;' FROM ALL_USERS
WHERE USERNAME = &1; Tom Harleman
11080 Willowmere Dr.
Indianapolis, IN 46280
317-844-2884 Home
317-843-9122 Home Office

-----Original Message-----
From: root_at_fatcity.com [mailto:root_at_fatcity.com]On Behalf Of ALEMU Abiy Sent: Friday, June 30, 2000 2:36 AM
To: Multiple recipients of list ORACLE-L Subject: Creating a user if it does not already exists using one SQL scrip

How can I create a user using a sql script not PL/SQL by testing if it already exists before issuing the CREATE USER command. Am I obliged to use a dynamic sql statements in a PL/SQL block or is there a simple method only by using SQL ?




@biy @lemu
Cril Telecom Software
France
--
Author: ALEMU Abiy
  INET: abiy.alemu_at_criltechnology.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Sat Jul 01 2000 - 08:21:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US