Oracle SQL RTFM question

Jerry Feldman gaf-iwcNaMm7aMIiq3RsQ1AnAw at public.gmane.org
Wed Apr 6 13:32:12 EDT 2011


I've got a shell script where I need to embed some Oracle commands. What I
need to do among other things is to see if a user does not exist, and create
a user.
Sqlplus user/pwd @commands.sql
In the commands file:
Select username from users like '%fubar%'
If username does not exist then
Create user ...;

I know how to create a user, grant, et.al, but I don't know how to set this
up to test if a user exists.




More information about the Discuss mailing list