What is the difference between a Stored procedure and function?

Answer Posted / viren chakraborty

a stored procedure is better when returning one or more
rows.
a function is better when returning a single scalar value.
function and procedure, both can accept parameters and both
also support output parameters.
for programmers, stored procedures are the way to go
because they directly return the result of a given select
statment.
in a function you will explicitly have to return a value
using return statement and returning more than 1 value
using a function is much more complicated.
the procedure is capable of doing all kinds of things
(select/insert/update/delete) and hence, it is better

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is round trip in asp.net?

509


What is intrinsic objects in asp.net?

630


Is asp.net free?

548


What is cross page posting? How is it done?

547


What’s the difference between asp.net web forms and asp.net mvc?

542






What is difference between Server.Transfer and Response.Redirect in ASP.NET?

550


how to implement some securty aspect in our application i.e 1.cookie poisioning. 2.data encryption. 3.forcefull browsing 4.sql/code injection 5.securing web app by using web services ........my question is how to implement these thing in our application is this done by hard coding or by help of some tool

1633


Why do we need a web application session?

505


Explain about Application and Session Events ?

630


Where the assembly is stored in asp.net?

544


What are the Difference between asp.net and asp ?

562


What are the various session state management options provided by asp.net?

533


Which dll handles the request of .aspx page?

554


What is a postback in asp net?

529


Can a master page have more than one contentplaceholder?

501