Home » SQL & PL/SQL » SQL & PL/SQL » Packages (10g database, oracle 9i)
Packages [message #618174] Wed, 09 July 2014 02:00 Go to next message
vippysharma
Messages: 73
Registered: May 2013
Location: www
Member
In package_spec we have only declare 2 procedures A & B.
Now in package_body area,can we declare a new procedure C with body (C is not declared in package_spec)?
Re: Packages [message #618178 is a reply to message #618174] Wed, 09 July 2014 02:05 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why don't you just try it? It'd be far faster than waiting for an answer here.
Yes you can, if you couldn't then the spec would be pointless.
Re: Packages [message #618183 is a reply to message #618174] Wed, 09 July 2014 02:20 Go to previous message
Michel Cadot
Messages: 68643
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

As cookiemonster said, yes you can.
Procedures/functions declared in package spec are known as public procedures/functions, they can be called by code outside the package.
Procedures/functions defined only in package body are known as private procedures/functions, they can be called by only procedures/functions inside the package itself.

Of course, all procedures/functions in the package spec must be defined (that is have their code) inside the package body.

Previous Topic: comparing collections
Next Topic: Subquery vs. Join performance (optimizer)
Goto Forum:
  


Current Time: Tue Apr 23 07:54:42 CDT 2024