what is difference between procedure and function

Answer Posted / aditi yadav

in addition to above answers -
1. Functions can be called inside procedure but procedure cannot be called inside functons.
2. Functions compiled every time when we call them whereas procedure compiles only once & can be called again and again without being compiled.
3. we can user functions in select statement but cannot use procedure.
4. Inside function we cannot user DML commands but inside procedures we can use DML commands.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between pl and sql?

770


Can we use views in stored procedure?

758


What will you get by the cursor attribute sql%found?

752


What does data normalization mean?

756


Does sql use python?

813


Differentiate between pl/sql and sql?

877


What is set transaction?

803


How do I view stored procedures?

769


What is the difference between instead of trigger and after trigger?

769


Why is pl sql used?

749


What company owns postgresql?

815


How to avoid using cursors?

829


How many functions are there in sql?

772


what is error ora-03113: end-of-file on communication channel?

875


What are the rules to be applied to nulls whilst doing comparisons?

1075