Hi,
Ques What is the differences between Stored Procedure and Function ?
Stored Procedure and Function
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 28, 2012, 10:53 AM EDT
http://www.c-sharpcorner.com/Forums/Thread/164513/difference-between-stored-procedure-and-function.aspx
Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 28, 2012, 7:36 PM EDT
1) function can be used with Select statement however SP have to use EXEC or EXECUTE.
2) function hav't any out put parameter , SP have.
3) function is not able to change server configuration, SP can.
4) function can not used with XML FOR Clause, SP can.
5) function can use with join UDF, SP cannot.
6) function cannot have transaction within, we can use transaction with in SP.
7) fuction able to return Table variables but SP won't return Table Variables
hope this help.
SenthilkumarRank #387 · 6.5K reputationPosted Mar 28, 2012, 7:49 PM EDT
I have written very good article with 14 differences between the stored procedures and functions.
http://www.c-sharpcorner.com/uploadfile/skumaar_mca/differences-between-procedures-and-functions/
If you have any doubt then let me know.