employer cover photo
employer logo
employer logo

Tata Consultancy Services

Part of Tata Group

Is this your company?

Tata Consultancy Services Interview Question

What is the difference between a Primary Key and a Unique Key in a database?

Interview Answer

Anonymous

Jan 4, 2025

: A Primary Key uniquely identifies each record in a table and cannot contain NULL values. A table can have only one Primary Key. On the other hand, a Unique Key also ensures that all values in a column are unique but can accept a single NULL value. A table can have multiple Unique Keys.