## COUNT_BIG

 Author Message Avaneesh -388582 Old Hand Group: General Forum Members Points: 374 Visits: 99 Hi,I. SELECT COUNT_BIG(*)II. SELECT COUNT_BIG(column_2)III. SELECT COUNT_BIG(ALL column_2)IV. SELECT COUNT_BIG(DISTINCT column_2)I Answered this question selecting II,III and IV (which actually is a correct answer) guess what i was indicated as INCORRECT! Pls let me know if I am so.coz all the three (2,3,4) have same output. Paul White SSCoach Group: General Forum Members Points: 15550 Visits: 11355 Avaneesh -388582 (5/20/2010)Hi,I. SELECT COUNT_BIG(*)II. SELECT COUNT_BIG(column_2)III. SELECT COUNT_BIG(ALL column_2)IV. SELECT COUNT_BIG(DISTINCT column_2)I Answered this question selecting II,III and IV (which actually is a correct answer) guess what i was indicated as INCORRECT! Pls let me know if I am so.coz all the three (2,3,4) have same output.Wow! That's amazing! What code did you use to come to that conclusion? I used this:`DECLARE @QotDTABLE ( Column_1 TINYINT NOT NULL, Column_2 TINYINT NULL ); INSERT @QotD VALUES (1, 1);INSERT @QotD VALUES (2, NULL);INSERT @QotD VALUES (3, 2);INSERT @QotD VALUES (4, 2);INSERT @QotD VALUES (5, NULL);INSERT @QotD VALUES (6, 3);INSERT @QotD VALUES (7, 4);INSERT @QotD VALUES (8, 5);INSERT @QotD VALUES (9, 6);INSERT @QotD VALUES (10, 7);--I.SELECT COUNT_BIG(*) FROM @QotD;--II.SELECT COUNT_BIG(Column_2) FROM @QotD;--III.SELECT COUNT_BIG(ALL Column_2) FROM @QotD;--IV.SELECT COUNT_BIG(DISTINCT Column_2) FROM @QotD;`I Answered this question selecting II,III (which actually is a correct answer) guess what i was indicated as CORRECT! Pls let me know if I am so. coz all the two (2,3) have same output. Paul WhiteSQLPerformance.comSQLblog.com@SQL_Kiwi Dhruvesh Shah SSChasing Mays Group: General Forum Members Points: 653 Visits: 237 All is by default so II & III are same expressions terrykzncs Say Hey Kid Group: General Forum Members Points: 700 Visits: 134 I think this question could have been worded better and is incomplete. shemu1990 Grasshopper Group: General Forum Members Points: 15 Visits: 14 explination given here is not fully correct-->"SELECT COUNT_BIG(ALL COlumn_2) and SELECT COUNT_BIG(column_2). COUNT_BIG(all column_2) will count all rows from the table (including duplicate & null rows). COUNT_BIG(DISTINCT column_2) will evaluate distinct non-null values. because ---> "COUNT_BIG(all column_2) will count all rows from the table including duplicate & Excluding null rows).andCOUNT_BIG(*) will count all rows from the table (including duplicate & null rows). shemu1990 Grasshopper Group: General Forum Members Points: 15 Visits: 14 explanation given here is not fully correct-->"SELECT COUNT_BIG(ALL COlumn_2) and SELECT COUNT_BIG(column_2). COUNT_BIG(all column_2) will count all rows from the table (including duplicate & null rows). COUNT_BIG(DISTINCT column_2) will evaluate distinct non-null values. because ---> "COUNT_BIG(all column_2) will count all rows from the table including duplicate & Excluding null rows).andCOUNT_BIG(*) will count all rows from the table (including duplicate & null rows).