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

How do you use collections in procedure to return the resultset?

2030


What is count * in sql?

768


Explain about various levels of constraint.

731


Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?

822


Why is nosql good?

804


What are the advantages of normalization?

832


What is foreign key and example?

733


Explain ddl statements in pl/sql?

757


What is sql in oracle?

824


Why cross join is used?

860


What is dialect in sql?

728


What are analytic functions in sql?

774


Can we insert in sql function?

803


What is set transaction?

785


What is trigger types of trigger?

749