Entries by Oracle ERP Apps Guide

, , ,

Parameters in PL SQL

A parameter is a variable whose value can be defined at execution time and can be exchanged between the procedure and the calling PL/SQL block. Parameter values can be passed in to the procedure from the calling PL/SQL block and can optionally have their values passed back out of the procedure to the calling PL/SQL […]

, , ,

RETURN statement in PL SQL

The use of the RETURN statement is unique to functions. The RETURN statement is used to return some value. In fact, the primary reason for storing a PL/SQL block as a function is to return this value—this is the purpose of the function. For example, if a function is meant to compute the total payments […]

, , ,

Invoking Procedures/Functions

Once a procedure has been created and stored in the database, it can be invoked from An executable statement of a PL/SQL block A command entered in the SQL*Plus command-line interface Executing a Procedure from a PL/SQL BlockTo invoke a procedure from another PL/SQL block, use a single statement that names the procedure. For example, […]

, , ,

Create, Alter and Drop

Creating ProceduresThe following is a code sample that will create a stored procedure named PROC_RESET_ERROR_LOG:CREATE PROCEDURE PROC_RESET_ERROR_LOG ISBEGIN  — Clean out the ERRORS table  DELETE FROM ERRORS;  COMMIT;END;The syntax to create a function is similar to the syntax used to create a procedure, with one addition: the RETURN declaration. The following is a sample CREATE […]

, , ,

Subprograms

Subprograms are named PL/SQL blocks that can take parameters and be invoked. PL/SQL has two types of subprograms called procedures and functions. Generally, you use a procedure to perform an action and a function to compute a value.   Uses of Procedures/FunctionsProcedures are excellent for defining a PL/SQL code block that you know you will […]