- Home
- Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion. In terms of values allowed in a
Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion. In terms of values allowed in a column, both UNIQUE and PRIMARY KEY constraints are not the same.
Reason. UNIQUE allows NULL value once in the column, but PRIMARY KEY does not.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Answer
Both A and R are true and R is the correct explanation of A.
Explanation
The UNIQUE and PRIMARY KEY constraints are similar in that they both ensure uniqueness of values in a column or set of columns. However, they differ in terms of the values they allow, particularly regarding NULL values. UNIQUE allows NULL values, whereas PRIMARY KEY does not.