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 time based sql injection?

484


How many types of functions are there in sql?

496


How can I change database name in sql?

521


what are integrity rules?

560


What is java sql connection?

508






Can ddl statements be used in pl/sql?

591


Is there any restriction on the use of union in embedded sql?

663


What is rownum?

535


What does the argument [or replace] do?

570


What are field types?

533


What view means?

550


Explain locks? : Transact sql

561


Where can I learn sql for free?

498


What is the difference between local variables and global variables?

600


Can we insert delete data in view?

537