Test Index

Structured Query Language (SQL) Get it on Google PlayDownload on the App Store CBSE Board Videos

© examsnet.com
Question : 17 of 58
Marks: +1, -0
Which aggregate function in SQL displays the number of values in the specified column ignoring the NULL values ?
[CBSE 2025 Set 4]
Solution:  
Concept:
COUNT(column) counts the non-NULL values in that column; COUNT(*) counts all rows.
Explanation:
For a column x holding 1, NULL, 3:
SELECT COUNT(x), COUNT(*) FROM T;
-> 2, 3
len(), number() and num() are not SQL aggregate functions.
Answer:
Option B (count())
© examsnet.com
Advertisements
Go to Question: