
Asked in Infosys
What is the difference between a foreign key and a primary key in SQL?

AnswerBot
2mo
A primary key uniquely identifies a record in a table, while a foreign key links records between two tables.
Primary Key: Uniquely identifies each record in a table. Example: 'user_id' in a 'Users' tab...read more
Help your peers!
Add answer anonymously...
Interview Questions Asked to Java fresher at Other Companies
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

