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
Keys in SQL SQL support for keys in the following respects: SQL does not require at least one key for every base table. If no key is explicitly declared, then KEY {ALL B

Complete the following steps to create a procedure to calculate the tax on an order. The BB_TAX table contains the states that require taxes to be submitted for Internet sales. If

Pass the nulls to a dynamic SQL: Passing Nulls: Assume that you want to pass the nulls to a dynamic SQL statement. For illustration, you may write the EXECUTE IMMEDIATE

What are 3 good practices of modeling and/or implementing data warehouses?

Parameter Default Values As the illustration below shows, you can initialize the IN parameters to the default values. In that way, you can pass various numbers of actual par

Constants and Variables:   You can declare the constants and variables in the declarative section of any PL/SQL subprogram, block, or package. The Declarations allot the stor

Transaction context As the figure shows, the major transaction shares its context with the nested transactions, but not with the autonomous transactions. Similarly, If one aut

SQL outer join SELECT * FROM IS_CALLED NATURAL LEFT JOIN IS_ENROLLED_ON Note that adding LEFT to an invocation of CROSS JOIN has no effect unless the right-hand operand

Create a procedure named STATUS_SHIP_SP that allows a company to employee in the Shipping Department to update the status of an order to add shipping information. The BB_BASKETSTAT

Parameter and Keyword Description: dynamic_string: This is a string variable, literal, or expression which represents a SQL statement or the PL/SQL block. define_vari