0

what is primary and foreign key?

11th Sep 2016, 7:28 AM
Sudarshan Kuppalli
Sudarshan Kuppalli - avatar
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.
11th Sep 2016, 10:47 AM
Siddhant Singh
Siddhant Singh - avatar