Procedure Vs Function

Explain when do we use a Procedure and when do we prefer using functions.

Showing Answers 1 - 2 of 2 Answers


  • Feb 10th, 2018

Procedure and function both are db objects..both will be stored as pre-compiled objects in our db.. the major difference is

1) Procedure may or may not return a value..but function must return a value in calling area

2) We can execute functions with select statement.where as procedure we can't execute with select statement

  Was this answer useful?  Yes

Mabula Shaik

  • Aug 18th, 2018

We can add few more points,
Those points are:
1) procedure can allow select as well as DML statements in it,
Where as function can allow only select statements.
2) a function can be called in procedure but a procedure cant be called in functions.
3) procedure can have both input and output parameters
Where as function can have only input parameters.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions