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