Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: clear all tables of a user
try
set heading feedback off
set pages 9999
spool nl_drop_tabs.sql
select 'drop table '||table_name||' cascade constraints;'
from user_tables;
spool off
@nl_drop_tabs
must be run as the relevant user.
-- Niall Litchfield Oracle DBA Audit Commission UK "Matthias Leonhardt" <i7lema_at_rz.uni-jena.de> wrote in message news:3CC942D3.30907_at_rz.uni-jena.de...Received on Fri Apr 26 2002 - 07:14:56 CDT
> Hi,
>
> do You have any suggestions for getting a how-to of frequently used
> sql-queries of a little guide of the oracle-sql commands?
>
> I need a sql-query to clear all tables of a user.
> I have the names of it from user_tables but how can I drop all tables of
> a given user?
>
> thanks for Your help!
>
> bye,
> Matthias Leonhardt
>