Question: what is the difference between table valued function and scalar 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.