Which type of value will not be considered by SQL while executing the following statement:
SELECT COUNT(column name) FROM TABLE_NAME;
Which type of value will not be considered by SQL while executing the following statement:
SELECT COUNT(column name) FROM TABLE_NAME;
Solution
✅ Correct Option: 4
COUNT(column_name) counts only the non-NULL values in that column. Any row where the column is NULL is skipped, while numeric, text and date values are all counted.
Options 1, 2 and 3: COUNT(column_name) does not depend on the data type, so these values are counted.
COUNT(*) is different: it counts all rows, including those with NULLs.
Related questions:
2026: 23 May Shift 1
2026: 23 May Shift 1
2025: 20 May Shift 1
2025: 16 May Shift 1
2025: 16 May Shift 1
