What is the difference between Primary Key and Unique Key? - ProProfs Discuss
Advertisement

What is the difference between Primary Key and Unique Key?

What is the difference between Primary Key and Unique Key?

Change Image    Delete

Asked by S. Barnes, Last updated: Nov 09, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

S. Leo

S. Leo

I write blogs for my website. I an Ex employee for a Texas based MNC.

S. Leo
S. Leo, Content Blogger, Journalism and Content Marketing, Mexico

Answered Jul 11, 2019

The primary key and unique key are two essential concepts in a relational database and used to identify a row in a table uniquely. The unique key ensures that no duplicate values are inserted in the database, while the primary and foreign key is responsible for maintaining integrity. The primary key can be a combination of more than one unique key in the same table.

The primary key and unique key are two essential concepts in a relational database and used to
There can only be one primary key per table in the relation database, but there can be more than one unique key per table. The unique key is represented using unique key constraint in any table, and it’s automatically got unique constraint.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.