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 the purpose of App_Code folder in ASP.NET? Why we this?
How can we access static variable?
What is class and object in asp.net?
List the types of authentication supported by asp.net?
What are the advantages of the code-behind feature?
Is it possible to write code in many languages in one asp.net project?
How long should a session id be?
What is the difference between executescalar and executenonquery?
What are asp.net web forms?
Explain asp.net page life cycle?
Disable Mouse right click on web page in asp.net?
Can you change a Master Page dynamically at runtime?
What is a global postback url?
explain code with multi inhertance
What is viewstate information stored?