what is the difference between primary key and foreign key?

Answers were Sorted based on User's Feedback



what is the difference between primary key and foreign key?..

Answer / gaytriom

A primary key is a column which uniquely identifies the
records in a table. In a broad sense, a primary key is the
mixture of a unique key and an index: A collumn with a primary
key is indexed to deliver a faster query, and doesn't allow
duplicate values to ensure specific data.

A foreign key is a column (the child collumn) in a table which
has a corresponding relationship and a dependency on another
collumn (the parent collumn) that is usually in a different
table. Parent collumns can have multiple child collumns, but a
child collumn can only have one parent collumn.

Is This Answer Correct ?    11 Yes 1 No

what is the difference between primary key and foreign key?..

Answer / vimal chauhan

Primary key does't allow null value
while foreign key allow null value

Is This Answer Correct ?    11 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

What is the use of the tag in the web.config file?

0 Answers   MindCracker,


what is CTS?

3 Answers   PrimeLine,


Define cookie.

0 Answers  


What is the postback property in asp.net?

0 Answers  


Explain about Multi-Language integration?

0 Answers  






How do active server pages work?

0 Answers  


Explain what is viewstate?

0 Answers  


Define asp.net caching?

0 Answers  


What is a ashx file?

0 Answers  


Where can I get information on cookies in asp.net?

0 Answers  


Types of caching ?

3 Answers   TCS,


How to refresh a page in asp.net

4 Answers  


Categories