Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
3 views
in SQL by (47.6k points)

Can you tell me the difference between a composite key and a primary key?

1 Answer

0 votes
by (106k points)

The difference between primary key and composite key is as follows:-

The primary key is used to uniquely identify the column of the table whose every row data is unique. In the table every row must have a primary key and no two rows can have the same primary key. The values of the primary key can never be null nor can be modified or updated.

When a set of columns will uniquely identify every row in the table it is called as Composite Key is which is a form of the candidate key.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...