Difference between Function and Stored Procedure?

Answer Posted / arunvs

stored procedure when executed generates execution plan
once and next time when it is executed again it will use
the generated execution plan,it does not generate it again.
sp used to solve a business logic

Function compiles from the beginning and prepares the trace
or execution each time it is called.function can be used to
calculations

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create new tables with "create table" statements in ms sql server?

571


How to round a numeric value to a specific precision?

575


Find columns used in stored procedure?

532


What is difference between oltp and olap?

580


How to fine-tune reports?

153






What are the events recorded in a transaction log?

509


Is it possible for a stored procedure to call itself or recursive stored procedure?

515


What is forward - only cursors / read only cursor?

523


How to find which stored procedure is currently running in sql server?

496


How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?

606


What is onf in normalization form?

576


What are the triggers in sql?

561


How to stop log file growing too big?

582


How do you delete a trigger?

586


Where in ms sql server is ’100’ equal to ‘0’?

606