adspace


Explain foreign key in sql?

Answer Posted / Kundan Kumar Vats

A foreign key is a field or set of fields in one table that refers to the primary key of another table. It establishes a link, or relationship, between two tables, enabling data from both tables to be related. A foreign key helps maintain data integrity by ensuring referential consistency, preventing orphaned records and other errors.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is your daily office routine?

2353


how to escape special characters in sql statements? : Sql dba

1124


what is schema? : Sql dba

1163


What is the best sql course?

1064


how to use regular expression in pattern match conditions? : Sql dba

1125


How do I remove duplicates in two columns?

1202


how to start mysql server? : Sql dba

1279


Is inner join faster than left join?

1287


what are aggregate and scalar functions? : Sql dba

1142


what are all the common sql function? : Sql dba

1141


If a cursor is open, how can we find in a pl/sql block?

1252


Does group by remove duplicates?

1120


Can we rollback truncate?

1083


What is the current version of postgresql?

1188


what is bcp? When does it used? : Sql dba

1065