
Asked in TCS and 24 others
What is a primary key, and what is the difference between a primary key and a unique key?

A primary key uniquely identifies a record in a table, while a unique key ensures all values in a column are distinct.
Primary key cannot contain NULL values; unique key can have one NULL value.
A table...read more
The primary key does not store null values, whereas the unique key does. A table can only have one primary key, whereas it can have multiple unique keys. The primary key does not allow you to delete o...read more
Primaray key does not store null value. In a table only 1 primary key is present Unqiue key can have null value. A table can have multiple unique key
Primary key cannot have null values while unique key cane have one null value
Primary key deosn't allow null value or duplicate value where as unique key accept one null value and doesn't allow duplicacy. In one table unique key can be multiple while only one primary key can be...read more
Interview Questions from Popular Companies










Reviews
Interviews
Salaries
Users

