Walmart interview question

What is referential integrity in SQL?

Interview Answer

Anonymous

18 Jul 2016

Referential integrity is a database concept that ensures that relationships between two tables remain consistent. The concept prevents adding a record to the table that contains the foreign key unless there is a corresponding record in the primary table.