Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Difference Between Stored Procedure and Fuction

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.


This post first appeared on ASP.NET CODES, please read the originial post: here

Share the post

Difference Between Stored Procedure and Fuction

×

Subscribe to Asp.net Codes

Get updates delivered right to your inbox!

Thank you for your subscription

×