what is the difference between primary key and foreign key?
Answers were Sorted based on User's Feedback
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 |
Answer / vimal chauhan
Primary key does't allow null value
while foreign key allow null value
| Is This Answer Correct ? | 11 Yes | 1 No |
what is the challenging situation you faced in your career?
3 Answers Calsoft, HP, Satyam, Wipro,
how to increase performance of web site? if there is a page with high load. the content is high then what should we do to increase performance?
3 Answers Emphasis, Mphasis, TCS,
How many types of session in asp.net2.0
28 Answers ABC, DOT, First Europa, HCL, iRely, TCS,
What is custom control. What is the difference between custom control and user control ?
What are the ways to sending the data in ASP.NET page?
How could you modify xaml content from javascript?
What is the differances between a abstract calss and interface
What is the use of placeholder control? Can we see it at runtime?
What are standard controls?
Which @page directive should you create an asynchronous page?
Explain about solution explorer window?
How does Garbage collector(GC) works in .net
14 Answers Accenture, HCL, Kekran Mekran, People Tech, Wipro,
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)