Oracle SQL Question:

Explain Difference between procedure and function.?

Tweet Share WhatsApp

Answer:

Functions are named PL/SQL blocks that return a value and can be called with arguments procedure a named block that can be called with parameter. A procedure all is a PL/SQL statement by itself, while a Function call is called as part of an expression.

Function and Procedure both are PL/SQL blocks, main difference between function and procedure is -
Function has to return some value using return clause whereas procedure may or may not return any value( no out parameter).

We can use functions in SQL query but can't use procedure.

Download SQL Oracle PDF Read All 16 SQL Oracle Questions
Previous QuestionNext Question
Explain What is the purpose of a cluster?Explain Which datatype is used for storing graphics and images?