In mode - parameter modes, PL-SQL Programming

IN Mode

An IN parameter pass the values to the subprogram being called. Within the subprogram, an IN parameter acts like a constant. And hence, it cannot be assigned a value. For illustration, the assignment statement below causes a compilation error:

PROCEDURE debit_account (acct_id IN INTEGER, amount IN REAL) IS

minimum_purchase CONSTANT REAL DEFAULT 10.0;

service_charge CONSTANT REAL DEFAULT 0.50;

BEGIN

IF amount < minimum_purchase THEN

amount := amount + service_charge; -- causes compilation error

END IF;

...

END debit_account;

The actual parameter that correspond to an IN formal parameter can be a literal, constant, initialized variable, or expression. Dissimilar OUT and IN OUT parameters, the IN parameters can be initialized to default values. 

Posted Date: 10/5/2012 5:31:21 AM | Location : United States







Related Discussions:- In mode - parameter modes, Assignment Help, Ask Question on In mode - parameter modes, Get Answer, Expert's Help, In mode - parameter modes Discussions

Write discussion on In mode - parameter modes
Your posts are moderated
Related Questions
BETWEEN and NOT BETWEEN Operator in SQL Example: Restricting exam marks to between 0 and 100 CREATE ASSERTION Marks_between_0_and_100 CHECK (NOT EXISTS (SELECT * FROM

User-Defined Exceptions The PL/SQL defines the exceptions of your own. Dissimilar to the predefined exceptions, the user-defined exceptions should be declared and should be rai

First Step at defining type SID in SQL CREATE TYPE SID AS ( C VARCHAR(5) ) ; Explanation: TYPE SID announces that a type named SID is being defined to the syst

Use of Table Comparisons - SQL Table comparisons where it is noted that although table expressions cannot be compared, we have TABLE (t) to convert a table expression t into

The accuracy of product table data is critical and the Brwebean's. owner wants to have an audit file that contains information regarding all DML activity on the BB_PRODUCT table. T

Using PRIOR and NEXT The PRIOR(n) returns the index number that precede index n in a collection. The NEXT(n) returns the index number which succeed the index n. If n has no pr

Creating a Table Syantax: CREATE TABLE ENROLMENT (StudentId SID, Name   VARCHAR (30) NOT NULL, CourseId CID, PRIMARY KEY (StudentId, CourseId)) ; Explan

CURRVAL and NEXTVAL The series is a schema object which generates the sequential numbers. Whenever you form a sequence, you can specify its primary value and an increment. T

IF Statement The IF statement executes a series of statement conditionally. Whether the series is executed or not depends on the value of the Boolean expression. Syntax:

Develop Data Business Intelligence Project Project Description: We are linking our Microsoft SQL Database to GoodData Business Intelligence. We are seeking somebody who has e