stephenwales
MIS
I have a task I need to do that requires me to create several objects in a database after I do a copy of production to test or training. Basically I drop some prod objects and recreate them for test.
I'd like to know how to code the following in PL/SQL, since I've never had to use PL/SQL before:
select username from dba_users where username = 'FRED';
if no rows returned
CREATE USER FRED
else
message: Fred already created
I'll keep looking through manuals to try to work it out, but if someone has a specific example, I'd appreciate it.
Thanks
Steve
I'd like to know how to code the following in PL/SQL, since I've never had to use PL/SQL before:
select username from dba_users where username = 'FRED';
if no rows returned
CREATE USER FRED
else
message: Fred already created
I'll keep looking through manuals to try to work it out, but if someone has a specific example, I'd appreciate it.
Thanks
Steve