ch07 - P L / S Q L Oracle10g Developer: PL/SQL Programming...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
P L / S Q L Oracle10 g Developer: PL/SQL Programming Chapter 7 PL/SQL Packages
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
P L / S Q L Oracle10g Developer: PL/SQL Programming 2 Chapter Objectives After completing this lesson, you should be able to understand: Creating package specifications Creating package bodies Invoking packaged program units Identifying public versus private construct scope Testing global construct value persistence
Background image of page 2
P L / S Q L Oracle10g Developer: PL/SQL Programming 3 Chapter Objectives (continued) After completing this lesson, you should be able to understand (continued): Including a forward declaration Creating one time only procedures Overloading packaged program units Managing restrictions on packaged functions used in SQL Using a cursor variable in a package
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
P L / S Q L Chapter Objectives (continued) After completing this lesson, you should be able to understand (continued): Determining execution privileges Identifying data dictionary information regarding packages Deleting or removing packages Oracle10g Developer: PL/SQL Programming 4
Background image of page 4
P L / S Q L Packages A package is another type of PL/SQL construct. It is a container that can hold multiple program units, such as procedures and functions. Allow programmers to organize units into related groups Furthermore, Oracle10g Developer: PL/SQL Programming 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
P L / S Q L Oracle10g Developer: PL/SQL Programming 6 Packages Add functionality Private program units Sharing variable values Overloading Ease privilege granting Improve performance Improving handling of dependencies (chaprt 8)
Background image of page 6
P L / S Q L Oracle10g Developer: PL/SQL Programming 7 Brewbean’s Challenge Organize the many program units developed for the application Store values throughout a user session Enable a program unit to handle different data types for arguments Ease the granting of privileges to users
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
P L / S Q L Oracle10g Developer: PL/SQL Programming 8 Package Specification Contains declarations for program units, variables, exceptions, cursors, and types Declare program units with the header only Order of declarations important if one construct refers to another in the specification
Background image of page 8
P L / S Q L Rebuild your database Load and run “c7Dbcreate.sql” Oracle10g Developer: PL/SQL Programming 9
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
P L / S Q L Package Specification The package specification declares all the contents of the package and is referred to as the package header. The specification is required and must be created before the body. CREATE [OR REPLACE] PACKAGE package_name IS | AS declaration section END; Oracle10g Developer: PL/SQL Programming 10
Background image of page 10
P L / S Q L Declaration in a Package Specification A package specification can contain declaration for procedures, functions, variables, exceptions, cursors and types.
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 56

ch07 - P L / S Q L Oracle10g Developer: PL/SQL Programming...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online