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
How to make paging concepts in datagrid in ASP.NET?
How do you implement sql caching in asp.net?
Explain how cookies work. Give an example of cookie abuse.
What is the mvc framework?
How would you turn off cookies on one page of your website?
Who can consume WebAPI?
What are the media types of http requests and response?
Can we set which type of comparison we want to perform by the CompareValidator control?
Why is string called immutable data type?
How many types of file extensions for razor views in ASP.Net MVC?
In the Repeater control which way you can edit?
What does asp stand for in asp.net?
Why do we need url encoding?
What is a gridview in asp.net?
How to find last error which occurred?