_____state the relation------ and difference between ^^^^^^primary and ************&**
foreign key
don't spam
Answers
1. Primary key uniquely identify a record in a table. Whereas, foreign key is a field in the table that is primary key in another table.
2. Primary key Can't accept null values. Whereas, foreign key can accept multiple null values.
3. We can only have one primary key in a table. Whereas, we can have more than one foreign key in a table.
Relationship: Both pirimary and foreign key is used to check the integrity on datas in the table.
Primary key is an attribute of a relation which gives a unique characteristic to a table
This key don't have any null value
This key doesn't takes any duplicate value
Also in simple words...
A cloumn in a table whose all the values are unique, different and are distinct from one another.
Foriegn key is key in one table will be the primary key of another table & vice versa.
Thank if u liked it