Monday Jun 1st 2009 by DatabaseJournal.com Staff

This script creates a user, if the user does not exist in the db and drops the user, if the user exists in the db.

>>Script Language and Platform: Oracle
In one of my Oracle projects, I had a unique requirement. I needed to create a user, if the user did not exist in the db. Drop the user, if the user exists in the db.

This is something similar to the SQL Server feature "if exists(....), if not exists( ....)". There is no such construct available in oracle.

This is my solution:

Author: JP Vijaykumarjp_vijaykumar@yahoo.com

Download Script:

Disclaimer: We hope that the information on these script pages is valuable to you. Your use of the information contained in these pages, however, is at your sole risk. All information on these pages is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, or fitness for a particular purpose... Disclaimer Continued

Back to Database Journal Home

Mobile Site | Full Site