What are Difference between Stored Procedure and Function

Distinguish, differentiate, compare and explain what is the difference between Stored Procedure and Function. Comparison and Differences.

Difference between Stored Procedure and Function

1. Stored Procedure can return zero , single or multiple values. Function can return one value which is mandatory.

2. We can use transaction in Stored Procedure. We can't use transaction in User Defined Function.

3. Stored Procedure can have input/output parameter. User Defined Function have only input parameter.

Difference between Stored Procedure and User Defined Function

4. We can called function from Stored Procedure. We can't call Stored Procedure from function.

5. We can't use Stored Procedure in SELECT/ WHERE/ HAVING statement. We can use User Defined Function in SELECT/ WHERE/ HAVING statement.

6. We can use exception handling using Try-Catch block in Stored Procedure. We can't use Try-Catch block in User Defined Function.



Tags:

Difference between Function vs Stored Procedure

Stored Procedure vs Function

Differences between Function vs Stored Procedure

Set Wet Deodorant Spray Perfume, 150ml (Cool, Charm and Swag Avatar Pack of 3)

Fresh fragrance that is long lasting, perfect for your day out, be it shopping, movies or just chilling.

Buy Now @ Minimum Price ₹ 178.00 / Offer only for limited time !

Set Wet Deodorant Spray PerfumeSet Wet Deodorant