What is the difference between Primary key and Foreign key?
Primary key:
- It Identifies each and every record uniquely
- We can create only one Primary key on a table
- Primary keys do not accept NULL values
- It creates a clustered index in the table by default
Foreign key:
- It makes the relation between two tables by pointing a foreign key of one table to the primary key of another table
- We can create more than one Foreign keys on a table
- Foreign keys accept NULL values
- It does not create any Index by default
Happy Reading
Latest Comments
Hurrah, that’s what I was seeking for, what a data!
present here at this blog, thanks admin of this web page.