Let us first understand these two terms by their definition. Stored Procedures are pre-compiled objects which are compiled for the first time and the compile format is saved, which gets executed whenever it is called, whereas SQL Server Function is compiled and executed every time it is called.

Being a developer we have to deal with creation as well as modification of existing stored procedures in the database. Apart from procedures a developer also gets to create functions in SQL Server.

There are a few basic differences between the two. Let us list down the basic differences between them.

I have to tried to list down the basic difference between stored procedure and function in SQL Server.