Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to know if a procedure exists?
Bram Stieperaere wrote:
> declare
>
> lv_ProcExists integer;
>
> begin
> select count(*)
> into lv_ProcExists
> from sys.all_objects
> where (owner = '<schemaname>') and
> (object_type = 'PROCEDURE') and
> (object_name = '<name of procedure>') and
> (status = 'VALID')
> ;
> dbms_output.put_line(lv_ProcExists);
> end;
>
> Jacques Sireude wrote:
>
> > Hi,
> > What is the sql statement to know if a procedure does exists in the
> > database?
> >
> > Thanks for any help.
> >
> > Jacques.
> >
> > ----------------------------------------------------------------------------
> > ----------------
> > Jacques SIREUDE
> > 6585 PICASSO Rd Apt#3
> > ISLA VISTA CA 93117
> > USA
> > tel/fax: 1-805-685-9208
> > e-mail: sireude_at_eiffel.com
> > jacques.sireude_at_enst-bretagne.fr
> > http://www-eleves.enst-bretagne.fr/~sireude
> > ----------------------------------------------------------------------------
> > ----------------
if the procedure is in a package, or is overloaded and you need to check the signature (number+types of arguments ) use all_arguments. Received on Tue Jul 07 1998 - 04:36:36 CDT