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

Re: Drop table

From: Christoph Gehrke <christoph.gehrke_at_gmx.de>
Date: Mon, 21 Feb 2000 12:58:08 +0100
Message-ID: <88r990$1cl$1@news08.btx.dtag.de>


HI,
your SQL statement is not nessesary. 'drop table....' with wrong tablename makes no changes on your db.
if you want to delete the tables of one tablespace or...., you better make a skript using sqlPlus:

example:

spool <filename>;
select 'drop table '||table_name||';' from user_tables where ...; spool off;

Christoph

petr_kucera_at_my-deja.com schrieb in Nachricht <88r2v5$qdq$1_at_nnrp1.deja.com>...
>Is there a way how to drop a table in Oracle DB, but I'd like to check
>if this table alredy exists in database?
>Something like this:
>
>if exists(select * from user_tables where table_name='mytable') then
> drop table mytable;
>end if;
>
>but I can't use DDL statements.
>
>ThanX.
>
>
>
>
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Mon Feb 21 2000 - 05:58:08 CST

Original text of this message

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