What is the difference between a function and a procedure in Oracle PL/SQL?

1 Answers
Answered by suresh

In Oracle PL/SQL, a function and a procedure are both types of stored programs that perform a specific task. The main difference between a function and a procedure is that a function returns a value, whereas a procedure does not.

A function can be used in SQL queries and expressions where a value is needed, while a procedure is used to perform a series of operations without returning a value. Functions are typically used to calculate and return a single value, whereas procedures are used to execute a series of statements.

In summary, the key difference between a function and a procedure in Oracle PL/SQL is that a function returns a value, while a procedure does not.

Answer for Question: What is the difference between a function and a procedure in Oracle PL/SQL?