Pages

Friday, 29 November 2013

What are the rules of writing package?

Answer
Packeges are PL/SQl constructs that allow related data to be stored together. A package has two parts: specification and a body.

The syntax of writing a package is:
Code:
CREATE [OR REPLACE] PACKAGE pkg_name {IS | AS}
procedure_specification |
function_specification |
variable_declaration |
type_definition |
exception_declaration |
cursor_declaration
END [pkg_name];

Thus the rules of writing a package would be:

* A package should have a name,
* The elements within the package should be the same as they are in the declarative section of an anonymous block.
* The same syntax rules apply to the package header as the declarative section, except for the procedures and the functions declarations.

Oracle procedure and package - August 28, 2008 at 15:00 PM by Amit Satpute

No comments:

Post a Comment

Enter Your Question

Total Pageviews

Blog