Loading
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
Syed ShanuRank #87 · 23.7K reputationPosted May 29, 2015, 12:52 AM EDT
Khargesh RajputRank #616 · 3.9K reputationPosted May 29, 2015, 12:32 AM EDT
Nilesh JadavRank #109 · 20.3K reputationPosted May 29, 2015, 3:11 AM EDT
1) It protect your table data from intruders.
2) Using Store Procedures you are separating your database from the coding
part, and it is good thing. From that any one can understand the flow of your application.
3) It also used for making fewer calls to the database. Suppose you want to fire 4 sql query. If you are using Store Procedure you can do it by one sql statement. Hence not much disturbance to the Database.
1) It Can be used with Select statement
2) It will not return output parameter but returns Table variables
3) You can join UDF
4) It Cannot be used to change server configuration
5) It Cannot be used with XML FOR clause
6) It Cannot have transaction within function
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted May 29, 2015, 3:19 AM EDT
Jagdev MishraRank #1,819 · 815 reputationPosted May 29, 2015, 3:20 AM EDT
Syed ShanuRank #87 · 23.7K reputationPosted May 31, 2015, 4:13 PM EDT
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Jun 1, 2015, 12:05 AM EDT
2) Procedures can have input, output parameters for it whereas functions can have only input parameters.
3) Procedure allows select as well as DML(INSERT/UPDATE/DELETE) statements in it whereas function allows only select statement in it.
4) Functions can be called from procedure whereas procedures cannot be called from function.
5) Exception can be handled by try-catch block in a procedure whereas try-catch block cannot be used in a function.
6) We can go for transaction management in procedure whereas we can't go in function.
7) Procedures cannot be utilized in a select statement whereas function can be embedded in a select statement.