Google News
logo
SQL Server - Interview Questions
What is the difference between function and stored procedure?
* A Function must return a value while stored procedure can return zero or n value.

* Functions can have only input parameter while procedures can have input/ output parameters.

* Functions take one mandatory input parameter while stored procedures may take 0 to n input parameter.

* Try-catch block can handle exceptions. In the stored procedure, while you can't use try-catch in functions.
Advertisement