Over 10 Million Study Resources Now at Your Fingertips


Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Language:EN
Pages: 2

You dont need the data returned the out parameter

246

Chapter 9

Table 9.6

A parameter is an input parameter. Inside the

subprogram the parameter acts as a constant. It is
always passed by reference.

IN OUT

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;

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Payment
Make payment
Document download
Download File
PageId: ELI51E9F0C
img
Uploaded by :
AZloVMwO
Page 1 Preview
you dont need the data returned the out parameter
Sell Your Old Documents & Earn Wallet Balance