Database & Data Handling (NCCIA) MCQs
1999 MCQs is category mein available hain.
All MCQs in Database & Data Handling (NCCIA)
951 Why would a designer use UNIQUE instead of PRIMARY KEY for a PassportNo column?
Explanation
A table can have only one primary key, so other naturally unique columns are protected with UNIQUE.
Last verified on 27-11-2026
952 Which value would violate a UNIQUE constraint on ProductCode?
Explanation
Only a repeated value violates UNIQUE; a new distinct code is allowed.
Last verified on 27-11-2026
953 A UNIQUE key is also called:
Explanation
In SQL, a unique key is implemented as a UNIQUE constraint backed by a unique index.
Last verified on 27-11-2026
954 Can a UNIQUE key be used as a foreign key reference in another table?
Explanation
A referenced key must uniquely identify the parent row, so a UNIQUE NOT NULL column is a valid target.
Last verified on 27-11-2026
955 Which of the following is true about a unique key?
Explanation
A candidate key not selected as primary key is an alternate key, and it is often enforced with UNIQUE.
Last verified on 27-11-2026
956 What does UNIQUE mean for a column holding CNIC numbers?
Explanation
CNIC is a real-world unique identifier, so a UNIQUE constraint correctly prevents duplicates.
Last verified on 27-11-2026
957 In most DBMSs, creating a UNIQUE constraint automatically creates:
Explanation
The DBMS creates a unique index to enforce the constraint efficiently and to speed lookups.
Last verified on 27-11-2026
958 Which column should NOT normally have a UNIQUE constraint?
Explanation
UNIQUE is only suitable for columns whose values are naturally distinct; gender has few repeated values.
Last verified on 27-11-2026
959 If a table has a PRIMARY KEY on ID and UNIQUE on Email, how many rows can share the same Email?
Explanation
The UNIQUE constraint on Email forbids any duplicate email across rows.
Last verified on 27-11-2026
960 In SQL, a composite UNIQUE constraint on (FirstName, LastName, DOB) ensures:
Explanation
A composite UNIQUE constraint applies to the combined values, not to each column separately.
Last verified on 27-11-2026