This is one of questions that is regularly asked in interview
1) Stored procedures may or may not return a value or can return more than one value but a Function has to return a single value either a scalar or a table.
2) To return a value in Stored Procedure Output parameter have to be used but it cant be used in Functions.
3) Transactions can be used in Stored Procedure but not in Functions.
4) Functions can be used in select statement but Stored Procedure have to be Executed(EXEC).
5) We can use Function in Stored Procedures but cant use stored Procedure in Function.
6) We can use Try-Catch block in Stored Procedure for Error Handling but not in Functions.
1) Stored procedures may or may not return a value or can return more than one value but a Function has to return a single value either a scalar or a table.
2) To return a value in Stored Procedure Output parameter have to be used but it cant be used in Functions.
3) Transactions can be used in Stored Procedure but not in Functions.
4) Functions can be used in select statement but Stored Procedure have to be Executed(EXEC).
5) We can use Function in Stored Procedures but cant use stored Procedure in Function.
6) We can use Try-Catch block in Stored Procedure for Error Handling but not in Functions.