Multiple choice technology databases

which two statements are true about the GROUPING function ?

  1. used to find the groups forming the subtotal in a row

  2. used to identify the NULL value in the aggregate function.

  3. use to form the group sets involved in generating the totals and subtotals

  4. only be used with ROLLUP and CUBE operators specified in the GROUP BY clause

Reveal answer Fill a bubble to check yourself
A,D Correct answer
Explanation

The GROUPING function returns 1 if the column value in a row is a NULL generated by a ROLLUP or CUBE operation (representing a subtotal/total group), and 0 otherwise. It can only be used with ROLLUP/CUBE in the GROUP BY clause. It does not identify standard stored NULL values.