📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Which constraint is automatically created when a column is declared as PRIMARY KEY?

A. A foreign key to itself
B. A unique index on that column ✅
C. A CHECK constraint
D. A DEFAULT value of zero

Correct Answer: B. A unique index on that column

Explanation

  • A primary key creates a unique index to enforce uniqueness efficiently.
  • It also enforces NOT NULL on the key columns.