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

Home -> Community -> Usenet -> c.d.o.server -> Re: Drop table in sql

Re: Drop table in sql

From: Andreas Hess <ahess_at_truworths.co.za>
Date: 1997/09/18
Message-ID: <01bcc42f$7f0b8660$300610ac@trahe>#1/1

Hi

Connected as the table owner, run the following from SQL*Plus:

SPOOL drop.sql

SELECT 'DROP TABLE ' || TABLE_NAME || ';' FROM USER_TABLES; SPOOL OFF Remove the odd header line from the generated script and run using @drop.sql from SQL*Plus.

You may have to run this script several times if you have foreign key constraints on some tables...

Hope this helps

Andreas

Cuong Quyen Truong <jackt_at_cse.unsw.EDU.AU> wrote in article <Pine.OSF.3.95.970918192949.21195D-100000_at_pipe07.orchestra.cse.unsw.EDU.AU>. .
>
> Does anyone know how to drop all the tables with one sql sttement.
>
>
  Received on Thu Sep 18 1997 - 00:00:00 CDT

Original text of this message

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