Quantcast
Channel: Solved » sql-server
Viewing all articles
Browse latest Browse all 48

Function vs Stored Procedure in SQL Server

$
0
0

I’ve been learning Functions and Stored Procedure for quite a while but I don’t know why and when I should use a function or a stored procedure. They look same to me, maybe because I am kinda newbie about that.

Can some one tell me why?

Solution

Functions are computed values and cannot perform permanent environmental changes to SQL Server (i.e. no INSERT or UPDATE statements allowed).

A Function can be used inline in SQL Statements if it returns a scalar value or can be joined upon if it returns a result set.

Related

The post Function vs Stored Procedure in SQL Server appeared first on Solved.


Viewing all articles
Browse latest Browse all 48

Trending Articles