How many primary keys can be there in a table?

2023

How many primary keys can be there in a table?

  1. A.

    Only 1

  2. B.

    Only 2

  3. C.

    Depends on number of columns

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 3172 students.

Show answer & explanation

Correct answer: A

In a relational database, a primary key is a column or set of columns that uniquely identifies each row in a table. A table can have only one primary key constraint, even if it consists of multiple columns (known as a composite primary key). This ensures data integrity and prevents duplicate rows. Therefore, the correct answer is that only one primary key can exist in a table.

Explore the full course: Up Lt Grade Assistant Teacher 2025