Question:medium

A table has two candidate keys, one of which is chosen as the primary key. How many alternate keys does this table have?

Show Hint

Alternate keys = candidate keys - primary key. Here that is 2 - 1.
Updated On: Oct 20, 2026
  • 0
  • 1
  • 2
  • 3
Show Solution

The Correct Option is B

Solution and Explanation

Step 1: Draw a small example:
Take a STUDENT table with columns RollNo, AadhaarNo and Name.
Both RollNo and AadhaarNo are unique for every student, so they are the two candidate keys.

Step 2: Choose the primary key:
The designer picks RollNo as the primary key.
That leaves AadhaarNo as the only candidate key that was not chosen.

Step 3: Name the leftover key:
A candidate key that is not chosen as primary key is an alternate key.
So AadhaarNo is the alternate key, and the count is 1.
The same logic works for any table with 2 candidate keys, because one is used as primary and one is left.

Step 4: Why the other values are wrong:
0 is wrong because one candidate key is always left when there are two.
2 is wrong because it counts the primary key too.
3 is wrong because the table has only 2 candidate keys in all.

Final Answer:
The number of alternate keys is 1, which is option (B).
Was this answer helpful?
0