Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
1641 What does COUNT(DISTINCT DeptID) return?
Explanation
DISTINCT inside COUNT counts each different DeptID once, ignoring repeats.
Last verified on 27-11-2026
1642 Which aggregate can be used on a text column to find the alphabetically last value?
Explanation
MAX on text returns the greatest value in alphabetical order, such as the last name alphabetically.
Last verified on 27-11-2026
1643 Which statement shows subjects with at least 20 students enrolled?
Explanation
HAVING tests the grouped count, so only subjects with 20 or more enrolments are returned.
Last verified on 27-11-2026
1644 Which statement gives the average salary of employees in Lahore only?
Explanation
WHERE City = 'Lahore' filters rows before averaging, so AVG covers only Lahore employees.
Last verified on 27-11-2026
1645 What is the result of SUM on an empty set of rows?
Explanation
SUM over no rows returns NULL, while COUNT over no rows returns zero.
Last verified on 27-11-2026
1646 Which statement correctly uses NOT IN?
Explanation
NOT IN excludes rows whose value appears in the list, so it returns students from neither Lahore nor Karachi.
Last verified on 27-11-2026
1647 What is the result of COUNT(*) on an empty table?
Explanation
COUNT(*) counts rows, and an empty table has zero rows to count.
Last verified on 27-11-2026
1648 Which statement finds employees whose name starts with A and whose salary is above 50000?
Explanation
LIKE A% tests the name start, AND requires Salary above 50000 as well.
Last verified on 27-11-2026
1649 Which statement correctly combines an aggregate with a non-aggregated column?
Explanation
A non-aggregated column in SELECT must appear in GROUP BY, which this statement satisfies.
Last verified on 27-11-2026
1650 Which ORDER BY clause sorts marks descending, with names ascending for equal marks?
Explanation
The first key sorts marks largest first, and the second key orders tied marks by name from A to Z.
Last verified on 27-11-2026