Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Drop tables at once

Re: Drop tables at once

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Mon, 4 Oct 1999 16:01:13 +0200
Message-ID: <7tac0r$npc$1@oceanite.cybercable.fr>


You can use drop table ... cascade constraints to avoid the ORA-02449 error.

To drop all tables of a user you can generate and execute a script:

select 'drop '||table_name||' cascade constraints;' from dba_tables where owner='<the user>';

or even drop and recreate the user if he has no other object (like procedure...).

--
Regards

Michel

Ermina Chatzipavli <echatzip_at_filmnet.gr> a écrit dans le message : 37F8AD2A.9A8004BF_at_filmnet.gr...
> Dear all,
>
> Is there a way to drop all tables, indexes etc at once? I now have to
> do it either manually following the right order so the error message
> (ORA-02449: unique/primary keys in table referenced by foreign keys)
> doesn't appear
> or via the Schema Manager (removing table one by one).
>
> This would really be helpful.
>
> Thanks,
>
> Ermina
>
Received on Mon Oct 04 1999 - 09:01:13 CDT

Original text of this message

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