What is a foreign key?

Practice Questions

Q1
What is a foreign key?
  1. A primary key in another table
  2. A unique identifier for a table
  3. An attribute that can be null
  4. A key used for indexing

Questions & Step-by-Step Solutions

What is a foreign key?
Correct Answer: A foreign key is a primary key in another table.
  • Step 1: Understand that a database is made up of tables that store information.
  • Step 2: Each table can have a special column called a primary key that uniquely identifies each row in that table.
  • Step 3: A foreign key is a column in one table that links to the primary key of another table.
  • Step 4: This link creates a relationship between the two tables, allowing you to connect related data.
No concepts available.
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely