Difference between scalar, table-valued, and aggregate functions in SQL server?

前端 未结 4 1246
长发绾君心
长发绾君心 2020-12-23 13:09

What is the difference between scalar-valued, table-valued, and aggregate functions in SQL server? And does calling them from a query need a different method, or do we call

4条回答
  •  独厮守ぢ
    2020-12-23 14:13

    A scalar function returns a single value. It might not even be related to tables in your database.

    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.

提交回复
热议问题