Re: Quite table delete from SQL*PLUS

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Tue, 2 Nov 2004 06:53:35 +0100
Message-ID: <41871ffe$0$309$636a15ce_at_news.free.fr>


"GIMME" <gimme_this_gimme_that_at_yahoo.com> a écrit dans le message de news:3f12b4fb.0411011728.2cc07917_at_posting.google.com...
> Is there a way to to a quite delete and supress the error message
> if a table already exists? I'm deleting about 50 tables and something
> which uses a select count(*) would clutter things up.
>
> Thanks
>
>
>
> drop table vmapping
> *
> ERROR at line 1:
> ORA-00942: table or view does not exist

declare

   doesnotexist exception;
   pragma exception_init (doesnotexist, -942); begin

   execute immediate 'drop table vmapping'; exception

   when doesnotexist then null;
   when others then raise;
end;
/

-- 
Regards
Michel Cadot
Received on Tue Nov 02 2004 - 06:53:35 CET

Original text of this message