Advertisements
Advertisements
Question
Assertion (A): The PRIMARY KEY constraint in SQL ensures that each value in the column(s) is unique and cannot be NULL.
Reason (R): Candidate keys are not eligible to become a primary key.
Options
Both Assertion (A) and Reason (R) are true and Reason (R) is the correct explanation for Assertion (A).
Both Assertion (A) and Reason (R) are true and Reason (R) is not the correct explanation for Assertion (A).
Assertion (A) is true, but Reason (R) is false.
Assertion (A) is false, but Reason (R) is true.
MCQ
Assertion and Reasoning
Advertisements
Solution
Assertion (A) is true, but Reason (R) is false.
Explanation:
- Assertion (A) is True: A PRIMARY KEY uniquely identifies each record in a table. By definition, it must contain unique values and cannot contain NULL values.
- Reason (R) is False: This statement is incorrect because Candidate Keys are specifically the columns that are eligible to become a primary key. In fact, the Primary Key is simply a candidate key that has been chosen by the database designer.
shaalaa.com
Is there an error in this question or solution?
