You dont need the data returned the out parameter
|
|
||
---|---|---|---|
Table 9.6 | |||
|
subprogram the parameter acts as a constant. It is
always passed by reference.
|
A parameter is both an input and output |
---|
parameter. It acts as an initialized value. By default
it is passed by value. Not allowed directly with
XSQL.
By default, parameters are passed as IN parameters. The following example shows how to specify each type:
CREATE OR REPLACE PROCEDURE priv_proc (defaultInParam NUMBER,
IS
-- declaration
PL/SQL | 247 |
---|
update_emp(emp_number=>7790,sal=>5000,name=>’EDWARDS’);
This is named notation as opposed to positional notation. Positional notation might look like this instead, assuming that the order of parameters in the update_emp defi-nition is name, emp_number, and sal.
First, a more extensive example using exceptions is needed. So far, you’ve had exception sections that only handle one exception. This example shows how you can use the exception section to handle multiple exceptions.
CREATE OR REPLACE PROCEDURE print_high_sal(sal_var IN OUT emp.sal%TYPE)
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE(‘unknown error’);
END;