Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get some optional parameters inside a stored procedure ?

user8099704Oct 1 2013 — edited Oct 1 2013

Hi everyone,

Can we call one or more parameters inside a stored procedure call (like func_get_args in PHP) ?

Example :

create or replace PROCEDURE test_proc (

     val1 in varchar DEFAULT NULL,

     val2 in varchar DEFAULT NULL,

     val3 in varchar DEFAULT NULL,

     val4 in varchar DEFAULT NULL

)

IS

BEGIN

-- call a pl/sql function to get some parameters ...

-- example : UPDATE a_table SET col1=val1, SET col3=val3 WHERE ... (val2 and val4 cannot be change and are not null in the table) ;

END test_proc ;

I have to call like this :

BEGIN

     test_proc (

          val1 => :val1,

          val3 => :val3

     ) ;

END ;

Thank for your help

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 29 2013
Added on Oct 1 2013
4 comments
2,219 views