What is the difference between a primary key and a unique key?

AnswerBot
2y
Primary key uniquely identifies a record in a table, while unique key ensures that all values in a column are distinct.
Primary key can't have null values, while unique key can have one null value.
A ta...read more
Rakesh Netha
3y
Primary key will not accept NULL values whereas Unique key can accept NULL values. A table can have only one primary key whereas there can be multiple unique key on a table
Help your peers!
Add answer anonymously...
HCLTech Senior Technical Lead interview questions & answers
A Senior Technical Lead was asked 1w agoQ. How do you debug your code?
A Senior Technical Lead was asked 4mo agoQ. What are the build tools used for Java projects?
A Senior Technical Lead was asked 4mo agoQ. What are the components of an Azure Kubernetes Service (AKS) cluster?
Popular interview questions of Senior Technical Lead
A Senior Technical Lead was asked 4mo agoQ1. What are the build tools used for Java projects?
A Senior Technical Lead was asked 4mo agoQ2. What are the components of an Azure Kubernetes Service (AKS) cluster?
A Senior Technical Lead was asked 5mo agoQ3. What is the product life cycle?
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

