+1 vote
1 view
in SQL by (41.8k points)

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

1 Answer

0 votes
by (95.7k 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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...