Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Drop table in sql
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
![]() |
![]() |