Interviews3 answers
What is difference Stored Procedure and Function?
Ankit Agarwal
Posted Sep 30, 2012, 8:52 PM EDT3 Answers
1. Procedures can have input/output parameters for it whereas functions can have only input parameters.
2. Procedure allows select as well as DML statement in it whereas function allows only select statement in it.
3. We can go for transaction management in procedure whereas we can't go in function.
4. Procedures can not be utilized in a select statement whereas function can be embedded in a select statement.
Ruchi HPosted May 15, 2013, 3:06 AM EDT
stored procedure:
1.return more than one output value
2.We can call the function in the stored procedure
3.Allows select as wel as the DML statement like insert,update and delete
4.try catch is applicable
Function:
1.Must return a single value.
2.We cant call the stored procedure inside the function
3.Allows only select statement
4.No try catch is allowed
balaji RPosted Oct 12, 2012, 2:06 AM EDT
Store procedure is the Group of Sql statements which is used to perform Insert,upadte,delete (CRUD)operations
Vithal WadjePosted Oct 4, 2012, 4:32 AM EDT
