Interviews6 answers
Difference Between StoredProcedure and Function
6 Answers
Functions can be called from Procedure whereas Procedures cannot be called from Function,
Function must return a value but in Stored Procedure it is optional( Procedure can return zero or n values),
Functions can have only input parameters for it whereas Procedures can have input/output parameters
Rafnas T PPosted Jan 10, 2016, 11:54 PM EST
1. SP can have both input and O/P parameters but Fun have only have I/P parameters
2. SP can call Fun but Fun can't call SP
3.Sp can return multiple value but fun only return single value.
4. Sp only execute single time and Fun execute on each call
Pankaj Kumar ChoudharyPosted Mar 28, 2015, 5:43 PM EDT
1) Storeprocedure can return multiple values while Function returns single value
2)storeprocedure can have input as well output parameters while Function can have only Input parameteres
sajidlkhan lodiPosted Feb 9, 2015, 1:21 AM EST
1) Storeprocedure can return multiple values while Function returns single value
2)storeprocedure can have input as well output parameters while Function can have only Input parameteres
sajidlkhan lodiPosted Feb 9, 2015, 1:21 AM EST
Stored Procedure Has input and out put parameter. Functions only has Input parameter.
We can call function from SP but we can not call SP from UDF.
Pramod VermaPosted Jan 25, 2015, 8:56 AM EST
Sotred Procedure:
1) It May or Maynot be return value.
2) work under Transaction Concepts
3) work under Try catch Concepts
4) All DML,DDL operation will work
Function:
1) It should be return the value
2) will not work under Transaction Concepts
3) will not work under Try catch Concepts
4) Only DDL operations will work
Rajesh PathakotiPosted Jul 15, 2014, 11:20 PM EDT


