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