Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete all tables belonging to a user.

Status
Not open for further replies.

GERPAT

Programmer
Aug 15, 2002
30
IE
Does anyone know hou do delete all tables belonging to a user. I tried the following but it doesn't work:

delete from username.*
 
If you aren't in the process of deleting the user, then you might want to write a script:

SELECT 'DROP TABLE the_user_name.'||table_name||';'
FROM dba_tables
WHERE user_name = 'THE_USER_NAME';
 
Another way to do this is to drop the user and then recreate it. But it drop all its objects (view,...)

Rgds,
Did02
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top