A primary key is the field(s) in a table that uniquely defines the row in the table; the values in the primary key are always unique. A foreign key is a constraint that establishes a relationship between two tables. This relationship typically involves the primary key field(s) from one table with an adjoining set of field(s) in another table (although it could be the same table). The adjoining field(s) is the foreign key.
- General Questions
- Technical Questions
- Project Management Questions
- Job Interview Puzzles
- Interview Advice
Similar Interview Questions
- SQL statement to aggregate multiplied rows
- What is Dynamic CSS?
- Explain a correlated sub-query? How can these queries be useful?
- How can one prove that the array is not null but empty?
- Please explain transaction isolation levels in EJB?
- Are you aware of any major JMS products available in the market?
- What are pass by reference and passby value?
- How can you compare a part of the name rather than the entire name?