Question: what is the difference between scalar valued function and table valued function?
Answer: A scalar function returns a single value. ... A tabled-valued function returns your specified columns for rows in your table meeting your selection criteria. An aggregate-valued function returns a calculation across the rows of a table -- for example summing values.