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 SOAP, UDDI and WSDL ?

2 Answers   Infosys, Network, TCS, Wipro,


What is WebService ?

8 Answers   Tanla Solutions, Yahoo,


What are the uses of list view control in Asp.net?

0 Answers   HCL,


what is command line compiler.what are the steps and how it is related to debugging.

0 Answers  


all asp.net interives questions

1 Answers  






Why session is used in asp.net?

0 Answers  


When you use Ajax controls in the ASP.NET application?

0 Answers   Viscus Infotech,


List of interview questions collections at www.dpoint.weebly.com

2 Answers   IBM,


Is object a value type or referenced type?

2 Answers  


Can I tap into other windows livetm services?

0 Answers  


What is cookies cache and session?

0 Answers  


What is difference between response.redirect and server.transfer ?

2 Answers   Kalinga Software, Satyam,


Categories