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

What is a data source file?

499


How to convert binary strings into integers in ms sql server?

556


List the different index configurations possible for a table?

512


What is system stored procedures?

587


what exactly sql injuction.how to overcome.....

2043






Does group by sort data?

513


What is difference between index and primary key?

589


How to trouble shoot if unable to connect SQL Server

1482


What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?

749


What is a rownum?

505


what is hash nonclustered index

537


Explain primary key in sql server?

569


Write an sql query to sort a table according to the amounts in a row and find the second largest amount.

564


Do you know query execution plan?

588


How use inner join in sql server?

617