What is the difference between a stored procedure and a function related to a table?

What is the difference between a stored procedure and a table function? they seem to perform the same functions

+3
source share
1 answer

Table-valued functions can return only one set of results; SPs can return multiple result sets.

You can subsequently query the results of table functions, but not with SP.

Thus, table functions are more flexible if you do not need multiple result sets.

+2
source

Source: https://habr.com/ru/post/1708155/


All Articles