0
what is primary and foreign key?
2 Respuestas
0
PRIMARY KEY -
1)it's unique . this helps in joining two different tables in a database so that no redundant data is obtained. Basically the whole column is supposed to have distinct/unique data
2) It cannot contain the null values
___________________________________________
FOREIGN KEY-
1)It's used as reference of Primary key. That is when you create a join in order to match data you need a corresponding foreign key.It can contain any number of duplications.
2)It can contain the null values.