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: dropping multiple tables

RE: dropping multiple tables

From: <John.Hallas_at_vodafone.co.uk>
Date: Tue, 22 Oct 2002 03:08:39 -0800
Message-ID: <F001.004EF7D5.20021022030839@fatcity.com>


No specific way of deleting selected multiple objects as far as I am aware. You could drop a tablespace including contents if you wanted to delete all objects in that tablespace or you can drop user cascade. The best bet is to create some dynamic sql to just create a script  

Something like the following will do it  

select 'drop table '||table_name||';' from user_tables where table_name in ('TABLEA','TABLEB' etc);
or
select 'drop table '||table_name||';' from user_tables ;  

and then spool the list to a file and delete all the lines you are not interested in.  

This is 8i and below , I don't know what version you are on and there might be something new in 9i but somehow I doubt it as normal mode is either to delete a selected table or delete all tables from a user or tablespace  

John

-----Original Message-----
Sent: 22 October 2002 10:34
To: Multiple recipients of list ORACLE-L

What is the syntax to delete multiple objects, or more specifically multiple tables from a user in 1 go.

I need to delete 50+ tables/objects without deleting them 1 by 1.  

Thanks  

Clint

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: John.Hallas_at_vodafone.co.uk

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Tue Oct 22 2002 - 06:08:39 CDT

Original text of this message

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