Procedures - syntax, PL-SQL Programming

Procedures

The procedure is a subprogram which can take parameters and be invoked. Normally, you can use a procedure to perform an action. The procedure has 2 sections: the specification & the body.

The specification starts with the keyword PROCEDURE and ends with the procedure name or a parameter list. The Parameter declarations are not obligatory. The Procedures that take no parameters are written without the parentheses. The procedure body starts with the keyword IS and ends with the keyword END followed by an elective procedure name.

The procedure body has 3 sections: an optional declarative section, an executable section, & an optional exception-handling section. The declarative section consists of declarations of the types, constants, cursors, variables, exceptions, &subprograms. These items are local and cease to exist whenever you exit the procedure. The executable section consists of statements which assign the values, manipulate Oracle data, and control execution. The exception-handling section contains the exception handlers that deal with the exceptions raised during execution.

Syntax:

621_procedures syntax.png

 

382_procedures syntax1.png

Posted Date: 10/8/2012 7:29:53 AM | Location : United States







Related Discussions:- Procedures - syntax, Assignment Help, Ask Question on Procedures - syntax, Get Answer, Expert's Help, Procedures - syntax Discussions

Write discussion on Procedures - syntax
Your posts are moderated
Related Questions
MILLER-UREY' S EXPERIMENTAL PROCEDURES - They recreated the probable conditions on the primitive earth in the laboratory. An atmosphere containing hydrogen, ammonia, me

Use Serially Reusable Packages To help you to manage the use of memory, the PL/SQL gives the pragma SERIALLY_ REUSABLE that mark some packages as serially reusable . So mark

Challenge 1 You are required to do the project and write a test plan for it. Demo 4 is a check writer program for employees. In it, the user enters all information about the

LOOP Statements The LOOP statements execute a series of statements at multiple times. The loops enclose the series of statements that is to be repeated. The PL/SQL provides typ

In Packages The Forward declarations also group logically related subprograms in the package. The subprogram specifications go in the package specification, & the subprogram b

Effect of Anonymous Columns Now, recall that a VALUES expression denotes a table with undefined column names. If an initial value is to be specified when a base table is creat

Disjunction (OR, ∨) Again we have nine rows instead of just four and again, when unknown is not involved, the rows are as for 2VL. Also, when anything is paired with true, t

Existential Quantification - SQL Existential quantification-stating that something is true of at least one object under consideration-can be expressed by OR(r,c), meaning tha

Using EXTEND To enlarge the size of a collection, use EXTEND. This process has 3 forms. The EXTEND appends one null element to a collection. And the EXTEND(n) appends n null e

Using LIMIT For nested tables, that have no maximum size, the LIMIT returns NULL. For varrays, the LIMIT returns the maximum number of elements that a varray can have (that yo