Multiple choice technology databases

The ADD_PLAYER, UPD_PLAYER_STAT and UPD_PITCHER_STAT procedures are grouped together in a package. A variable must be shared among only these procedures. Where should you declare this variable?

  1. a) In the package body.

  2. b) In the data base triggers.

  3. c) In the package specification.

  4. d) In the procedures declare section using the exact name in each.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Variables declared in the package body are private to that package - only the procedures within the body can access them. Package specification makes variables public (visible externally). Declaring in each procedure separately would create three independent copies, not one shared variable.