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 DataGrid wheater its a Server Control or something else ?

0 Answers   NA,


How we can kill our Session in web farm where there is no any sticky server .And user can not Logout bcoz of that.

3 Answers  


What is bson in web api?

0 Answers  


What are PDBs? Where must they be located for debugging to work?

4 Answers  


Explain the role of global.asax?

0 Answers  






Why and where this web.config file is used?

0 Answers   Amazon,


Why session is more secure than cookies?

0 Answers  


Apart from IDE what are the enhancements in asp.net 2.0?

0 Answers   Microsoft,


What symbol specifies the beginning of a query string?

0 Answers  


What types of data validation events are commonly seen in the client-side form validation?

0 Answers  


What is microsoft windows sharepoint services?

0 Answers  


what is service contract,operation contract?

2 Answers  


Categories