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
What are the modes of updation in an updatepanel? What are triggers of an updatepanel?
What is the use of express session?
How would you get asp.net running in apache web servers?
How to store checkbox value in database in asp.net mvc? : Asp.Net MVC
What is the flow of processing of the request? : asp.net mvc
Is session server side or client side?
Is session stored in browser?
Explain how can we inherit a static member?
Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?
Why asp.net is used?
Explain About duration in caching technique
Describe session handling in a webfarm?
How do I debug an asp.net application that was not written with visual studio.net and that does not use code-behind?
Define authentication and authorization.
Which is the parent class of the ASP.NET server control?