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 is custom events? How to create it?
Why session is used in asp.net?
What is .net framework and what are the main components of it?
What do you mean by role-based security?
Explain the namespace classes used in asp.net mvc? : asp.net mvc
Explain form level validation and field level validation?
What are the advantages and limitations of query string?
What is Dynamic Web and discuss its usage with the help of real life examples?
Differentiate between a hyperlink control and a linkbutton control.
What are different types of authentication techniques that are used in connection strings to connect .net applications with microsoft sql server?
What is the difference between dynamic SGA and static SGA?
Difference between .NET and previous version?
Explain the difference between overriding and overloading?
What is difference between asp.net and asp?
Is sql backend or frontend?