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
Iterative Control: LOOP  Statements The LOOP statement executes a series of statements multiple times. There are 3 forms of LOOP statements: LOOP, WHILE-LOOP, & FOR-LOOP. LOOP

Effects of NULL in Aggregate Operator - SQL Let aggop(x) be an invocation of some aggregate operator aggop in SQL, where x is an expression (usually an open expression) to be

Seeking a programmer to design a legal document with pre-existing fields that could allow the auto-population of client(s) information (i.e. Name, Account Number, Address etc.) int

Write a pl/sql block that declares and uses cursors with parameters. In a loop, use a cursor to retrieve the department number and the department name from the departments table

Using RENAME in combination with JOIN - SQL Example gives pairs of ids of students having the same name, by joining two renamings of IS_CALLED. Example gives an equivalent ex

%NOTFOUND The %NOTFOUND is logical, opposite of the %FOUND. The %NOTFOUND yields FALSE if the last fetch returned a row, or TRUE when the final fetch failed to return a row. I

EXCEPTION_INIT Pragma The pragma EXCEPTION_INIT relates an exception name with an Oracle error number. Which allow you to refer to any internal exception by the name and to wri

Using Pragma RESTRICT_REFERENCES: The function called from the SQL statements should obey certain rules meant to control the side effects. To check for violation of the rules,

Use of Table Expressions - Expressing Constraint Conditions With the exception of key constraints, the examples in the theory book all explicitly reference at least one relvar

Built-In Functions The PL/SQL provides a lot of powerful functions to help you to manipulate the data. These built-in functions fall into the categories as shown below: error r