Re: testing a created procedure

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 10 Jul 1998 14:48:15 GMT
Message-ID: <35a62971.6993295_at_192.86.155.100>


A copy of this was sent to "Bojie Cecilio" <ececilio_at_nospam.idirect.com> (if that email address didn't require changing) On Thu, 9 Jul 1998 22:12:16 -0400, you wrote:

>I am a new user of Oracle. I wanted to know how to test on how a procedure
>runs.
>
>I know for a function, I could use "select function(input) from dual;" and
>would show me the results. How can I do the same for a procedure.
>
>say I have,
>create or replace procedure proctest(a in integer, b out integer)
>as
>begin
> b:=a+1;
>end;
>
>How can I test the above procedure?
>
>

In sqlplus:

SQL> set serveroutput on
SQL> declare
   >     result    number;
   > begin
   >     proctest( 3, result );
   >     dbms_output.put_line( 'The result is ' || to_char(result) );
   > end;
   > /




 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Jul 10 1998 - 16:48:15 CEST

Original text of this message