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: How to drop table with like

Re: How to drop table with like

From: Mladen Gogala <mgogala_at_adelphia.net>
Date: Wed, 29 May 2002 06:03:49 -0400
Message-ID: <ad2926$tlf74$1@ID-82084.news.dfncis.de>


On Wed, 29 May 2002 03:16:08 -0400, Tony Johansson wrote:

> Hello Experts!!
>
> Is it possible to drop all table that match this string '%KJL_%' by using
> any sort of sql.
>
>
> //thanks

select 'drop table '||table_name||';'
from user_tables
where table_name like '%KJL_%';
set trimout on
spool /tmp/ozymandias.sql
/
spool off
@/tmp/ozymandias.sql

Feel free to comine it with 'CASCADE CONSTRAINTS; option.

-- 
Mladen Gogala
Za Feral Spremni!
Received on Wed May 29 2002 - 05:03:49 CDT

Original text of this message

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