SQL — What are the Key Differences Between Primary Key and Foreign Key
Mukesh Singh
In this tutorial, you will learn "What are the key differences between Primary key and Foreign Key" in RDBMS.
As we know that relationship between two or more tables in SQL Server is the basic concept of any relational database. For an example. a family always starts with Parent and Children relationship, same as is a database always starts with product-item or customers-regions relationship.
🚀Primary Key — In a database, a table can have only one primary key which cannot have a NULL value. It always represents a clustered index in a database table and helps to organize the sequence of clustered index.
🚀Foreign Key — A foreign key is just a referential constraint between two tables. If a Primary key is used in the another table then it would be know in the another table as Foreign key which can accept multiple null value. Foreign key always generates after Primary key.
⭐To learn more, please follow us - http://www.sql-datatools.com ⭐To Learn more, please visit our YouTube channel at - http://www.youtube.com/c/Sql-datatools ⭐To Learn more, please visit our Instagram account at - https://www.instagram.com/asp.mukesh/ ⭐To Learn more, please visit our twitter account at - https://twitter.com/macxima ⭐To Learn more, please visit our Medium account at - https://medium.com/@macxima ... https://www.youtube.com/watch?v=fuXeD0gVO2Q
34394609 Bytes