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
Operator Precedence The operations within an expression are completed in a particular order depending on their precedence (priority). The table shows the default order of the op

Write SQL queries to solve the following specifications. Include the query AND THE OUTPUT.  A screen dump of the output is acceptable. Show as many rows as you can. A screen dump i

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

Loop Labels Like the PL/SQL blocks, loops can also be labeled. The label, an undeclared identifier enclosed by double angle brackets, should appear at the beginning of the LOOP

Cause of Indeterminacy in SQL One root cause of indeterminacy in SQL lies in its implementation of comparison for equality. For certain system-defined types it is possible for

Wrapping and unwrapping in SQL Operators WRAP and UNWRAP in connection with attributes whose declared types are tuple types. Example shows how extension and projection can be

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

Tautologies: Above given table allows us to read the truth of the connectives in the next manner. Just expect we are looking at row three. It means this says that, if there P

Deleting Objects You can use the DELETE statement to eradicate objects from an object table. To eradicate objects selectively, you use the WHERE clause, as shown below: BEG

Ensuring Backward Compatibility   The PL/SQL Version 2 permits some abnormal behavior which Version 8 disallows. Particularly, Version 2 permits you to (i) Make the forw