Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to drop table with like
> Hello Experts!!
>
> Is it possible to drop all table that match this string '%KJL_%' by using
> any sort of sql.
something like
begin
for tn in (select table_name t from user_tables
where table_name like '%KJL_%') loop
execute immediate 'drop table ' || tn.t;
end loop;
end;
/
should do the job.
Variations: use dba_tables or all_tables instead of user_tables in get informed what the difference between these is.
hth
Rene
-- Recherchen im schweizerischen Handelsregister: http://www.adp-gmbh.ch/SwissCompanies/Search.php3Received on Wed May 29 2002 - 02:16:27 CDT
![]() |
![]() |