What is the difference between private packages and public package . what is the difference in declaration of these 2 packages.

Showing Answers 1 - 2 of 2 Answers

KiranKW

  • May 2nd, 2007
 

hi ,

  i dont think there is something called as public package / private package. But yes the methods defined in a package can either be public or private.

Below is a simple expln.

  • Variables and constants that are not defined within any function or procedure in the package are called package data.
  • Package data declared inside the package specification is called public package data.
  • Package data declared inside the package body is called private package data.
  • Private package data can be accessed only by elements defined in the package itself.
  • Public package data can be accessed by the package itself and by any program that can execute that package.
  • Package data structures, public and private, act like globals and persist within a single Oracle session or connection.
  • Give your answer:

    If you think the above answer is not correct, Please select a reason and add your answer below.

     

    Related Answered Questions

     

    Related Open Questions