Can a procedure PL/SQL take a variable number of arguments?
In my case, the procedure is called by the submit button of a form, and the form has variable number of inputs.
A procedure can have a maximum of 2100 parameters; each assigned a name, data type, and direction. Optionally, parameters can be assigned default values.
The three parameter modes are IN (the default), OUT , and IN OUT . Any parameter mode can be used with any subprogram.
The three parameter modes, IN (the default), OUT , and IN OUT , can be used with any subprogram.
PL/SQL procedure parameters can have one of three possible modes: IN, OUT, or IN OUT. PL/SQL function parameters can only be IN. An IN formal parameter is initialized to the actual parameter with which it was called, unless it was explicitly initialized with a default value.
You don't mention it, but are you using mod_plsql?
If so, you should read about flexible parameter passing.
In short, prefix your procedure name with an exclamation mark in your browser and define your procedure with a name_array and value_array.
Sort of. You can give the procedure parameter default values:
CREATE PROCEDURE myproc( p_value_a NUMBER DEFAULT 1,
p_value_b NUMBER DEFAULT 2 ) AS
...
which you could call like this:
myproc( 999 );
or like this:
myproc (p_value_b => 11 );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With