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: Dante A. Notari-Locher <dnotari_at_cso.at>
Date: 1997/09/22
Message-ID: <342646DC.2D9EBD4@cso.at>#1/1

Hi !

    There isn't one statement to do that.

    You could drop and recreate the user holding the tables,     or you could generate from USER_TABLES a drop-script:

    SET HEAD OFF
    SET FEED OFF
    SET LINES 0
    SPOOL dropthem.sql
    SELECT 'drop table ' || TABLE_NAME || ';'

        FROM USER_TABLES;
    SPOOL OFF     The generated file would drop all tables ... BUT     you need a script to drop all referenatial constraints and run it     first (use USER_CONSTRAINTS).

    Regards

    Dante A. Notari-Locher

Cuong Quyen Truong wrote:

> Does anyone know how to drop all the tables with one sql sttement.
Received on Mon Sep 22 1997 - 00:00:00 CDT

Original text of this message

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