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 know if a procedure exists?

Re: How to know if a procedure exists?

From: Bram Stieperaere <bse_at_N_O_S_P_A_Msodexho-pass.be>
Date: Tue, 07 Jul 1998 11:36:36 +0200
Message-ID: <35A1EC23.E59B65E5@N_O_S_P_A_Msodexho-pass.be>

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

Original text of this message

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