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
Scoping Within the similar scope, all the declared identifiers should be unique. So, even if their datatypes differ, the variables and parameters cannot share the similar name.

Understanding Varrays The Items of type VARRAY are termed as the varrays. They permit you to relate a single identifier with the whole collection. This relationship lets you man

Assignments in pl/sql The Variables and constants are initialized every time a block or subprogram is entered. By default, the variables are initialized to NULL. Therefore, unle

How Exceptions Propagate ? Whenever an exception is raised, and if the PL/SQL cannot find a handler for it in the present subprogram or block, the exception propagates. That is

Question 1 . Compare SQL and PL/SQL Question 2 . Write a database trigger to implement the following check condition                          Given the following table

What Is a Collection The collection is an ordered group of elements, all of similar type (for e.g. the grades for a class of students). Each element has a unique subscript whic

Data Types in SQL - Decimal DECIMAL, NUMERIC, REAL, FLOAT and various other terms for various sets of rational numbers. When these key words are specified for the declared typ

Datatypes Every constant and variable has a datatype that specifies the storage format, constraints, and the valid range of values. The PL/SQL gives a variety of predefined dat

Defining REF CURSOR Types To make cursor variables, you take 2 steps. At first, you define a REF CURSOR type, and then declare the cursor variables of that type. You can defin

The SQL ‘CREATE TABLE' scripts for all the tables you have implemented. Note that your tables must correspond exactly to the ERD you have provided in 1. above, or you will lose ma