Webucator's Blog

|

How to choose between a procedure and a function in PL/SQL?

TL;DR

Only use a procedure when a function won’t do the job.


Oracle has been around so long and so many questions have been asked and answered in so many different ways that it can be difficult to find a definitive answer, especially to a best-practices type question like this one.

There are dozens of pages and blog posts explaining the basic differences between PL/SQL functions and procedures:

  1. Functions return a value. Procedures don’t.
  2. Functions are callable (with some restrictions) from within standard SQL statements. Procedures aren’t.

Continue Reading »