Functions in SQL Server :-
- A function is also a named tsql block takes some input performs a task and must returns a value.
Difference between Procedures and Functions in SQL Server:
Procedures :
- A procedure need not return a value.
- Returns values using out parameters.
- procedure can return more than one value
- procedure can’t be called in select statement.
Functions :
- Function must return a value.
- Function returns value using return expression.
- Function can return only one value.
- But function can be called in select Statement.