Monday, February 23, 2009

Private stored procedures in an Oracle package

I never knew you could write a procedure in a package that isn’t declared in the package declaration.  It’s kind of like a private function/subroutine since it can’t be called by anything outside of the package…which is how I discovered this “feature”.  I was trying to call an “undeclared” procedure from a different package.  I had already written another procedure that called it from its own package, so I was mighty confused about the error I was getting: “MY_PROC must be declared” but now it makes perfect sense. 

One other discovery I made is that you can pass NULL as a parameter to another procedure instead of declaring a null valued variable.

No comments: