Subhash Sharma

Subhash Sharma
Subhash Sharma

This is Subhash Sharma(Software Engineer) Blog

Welcome to this blog and find every solution.............

Search This Blog

Software Engineer(Subhash Sharma)

Software Engineer(Subhash Sharma)
Software Engineer

Thursday, March 18, 2010

Difference Between function and procedure in sqlserver

1)Function returns a value, but a procedure may return or may not return a value.

2)Function can take only input argument, but procedure may take both input and output parameters.

3)Function can be called inside the select statement but not the procedure

4)Function return 1 value only. Procedure can return multiple value.

5)Function are compiled and executed at runtime.Stored Procedure are stored in parsed and compiled format in the DataBase.

6)Function cannot affect the state of the database which means it cannot perform insert,update,delete and create operation on the database.
Stored procedure can affect the state of the database by using Insert,delete,update and create operation.

No comments:

Post a Comment