Different between function, procedure and package in pl/sql?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Sep 29, 2022, 1:08 AM EDT
Function: The PL/SQL function consists of return type and is responsible for computing so that it can return a single value. Due to a specification in return type, the value returned must be in that same type.
Procedure: Procedure is just responsible for a return statement that can stop an execution and return back to the caller. Unlike a function, the procedure does not have any specific return type and doesn’t return single but multiple values.
Package: A package, which is a schema object, is responsible for grouping PL/SQL types, subprograms and items, which are logically related. Package consists of all i.e. procedure, record type statement, function, and procedure. Being able to provide modularity, it is cable of developing an application. Using a package, you can hide information coming from an unauthorized user.