Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
1721 What does DISTINCT do when used with two columns?
Explanation
DISTINCT applies to the whole selected row, so a pair is kept once even if each value appears elsewhere.
Last verified on 27-11-2026
1722 Which statement counts only students from Lahore?
Explanation
COUNT(*) with WHERE counts only rows that pass the Lahore filter.
Last verified on 27-11-2026
1723 Which clause is used to filter groups after GROUP BY?
Explanation
HAVING filters grouped results, while WHERE filters individual rows before grouping.
Last verified on 27-11-2026
1724 Which statement shows departments with more than 10 employees?
Explanation
Aggregate conditions on groups must use HAVING, because WHERE cannot test COUNT(*) before grouping.
Last verified on 27-11-2026
1725 What does GROUP BY do?
Explanation
GROUP BY collects rows sharing a value, so COUNT or SUM can be computed separately for each group.
Last verified on 27-11-2026
1726 Which statement gives the number of students in each city?
Explanation
GROUP BY City creates one group per city and COUNT(*) counts the students in each group.
Last verified on 27-11-2026
1727 Which statement finds employees whose salary is 30000, 40000 or 50000?
Explanation
IN lists the exact values to match, which is shorter than three OR conditions.
Last verified on 27-11-2026
1728 Which aggregate function returns the average of a numeric column?
Explanation
AVG computes the arithmetic mean of the values in a numeric column.
Last verified on 27-11-2026
1729 How are rows with a missing Age value found?
Explanation
NULL means unknown, so it cannot be tested with =; the correct test is IS NULL.
Last verified on 27-11-2026
1730 Which aggregate function returns the largest value in a column?
Explanation
MAX returns the greatest value in the column, whether numeric, date or text.
Last verified on 27-11-2026