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

Does truncate free space?

523


What is row_number () in sql?

550


Explain two easy sql optimizations.

606


Which is faster subquery or join?

664


Can delete statement be rollbacked?

531






Is sql scripting language?

528


What is PL/SQL Records?

631


How many functions are there in sql?

545


what are the nonstandard string types? : Sql dba

613


Explain raise_application_error.

646


Does group by remove duplicates?

557


What are the two types of exceptions.

639


Can %notfound return null after a fetch?

593


How would you pass hints to the sql processor?

532


Is it possible to include an insert statement on the same table to which the trigger is assigned?

567