GROUPING « Analytical Functions « SQL Server / T-SQL Tutorial






14.4.GROUPING
14.4.1.GROUPING() Comes to the Rescue
14.4.2.Replacing NULLs with ALL and UNKNOWN
14.4.3.The syntax of the GROUPING function: GROUPING(column_name)
14.4.4.GROUPING() function returns a bit value (1 or 0) to indicate that a row is a rollup.