Difference between Primary Kay, Foreign Key, and Composite Key?
Difference between Primary Kay, Foreign Key, and Composite Key?
10627-Aug-2023
Updated on 28-Aug-2023
Home / DeveloperSection / Forums / Difference between Primary Kay, Foreign Key, and Composite Key?
Difference between Primary Kay, Foreign Key, and Composite Key?
Aryan Kumar
28-Aug-2023Sure. Here are the differences between primary key, foreign key, and composite key in SQL:
Here is a table summarizing the differences between primary key, foreign key, and composite key:
Here are some additional details about the differences between primary key, foreign key, and composite key:
student_id
, even if there are multiple students with the same name.customer_id
that references the primary key in a table of customers.ISBN
andedition
.