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
SQL Database: So, an SQL database is one whose symbols are organized into a collection of tables. Now, shows an SQL table as the current value of an SQL variable, ENROLMENT, b

Using TRIM This process has two forms. The TRIM removes an element from the end of the collection. The TRIM(n) removes the n elements from the end of the collection. For e.g.

Third Step at defining type SID in SQL CREATE DOMAIN SID AS VARCHAR(5) CHECK ( VALUE IS NOT NULL AND SUBSTRING(VALUE FROM 1 FOR 1) = 'S' AND CAST('+'||SUBSTRING(VALUE

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean’s wants to create a trigger that automatically updates the stock level of all pr

The Package Body The package specification is implemented by the package body. That is, the package body has the definition of every cursor and the subprogram declared in the p

Block Structure The PL/SQL is a block-structured language. That is, the fundamental units (procedures, anonymous blocks, and functions) that make up a PL/SQL program are logi

(a) What are decision support systems, and what role do they play in the business environment? (b) Data warehousing is defined as "a subject-oriented, integrated, non-volatile c

Iteration Schemes The bounds of a loop range can be variables, literals, variables, or expressions but must compute to integers. Below are some of the examples. As you can see t

Project Description: I am looking to change FullCalendar to add/delete sql server data when events are removed or dropped from Calendar. Events should only be included by dra

WHILE-LOOP The WHILE-LOOP statement relates a condition with the series of statements enclosed by the keywords LOOP and END LOOP, as shown: WHILE condition LOOP sequence_of_sta