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 are different types of keys?

737


how to use like conditions? : Sql dba

785


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

739


Is null operator in sql?

792


What are the two types of exceptions.

824






what is innodb? : Sql dba

762


Is it possible to link two groups inside a cross products after the cross products group has been created?

769


How do you explain an index number?

746


Is microsoft sql free?

778


What is an ndf file?

690


What is the life of an sql statement?

721


What are the features of pl sql?

768


How do you remove duplicates without using distinct in sql?

695


how to enter characters as hex numbers? : Sql dba

748


What are the properties of a transaction?

798