Examveda

Which Key is used to link two tables in Mysql?

A. Primary Key

B. Foreign Key

C. Both Primary and Foreign Key

D. None of the mentioned

Answer: Option B

Solution (By Examveda Team)

This question is about how you connect different pieces of information in a database. Imagine you have a table for customers and another table for orders.
To connect these tables, you need a special key. This key acts like a bridge between the two tables.
The answer is Option B: Foreign Key.
Here's why:
* Primary Key: This is a unique identifier for each row in a table (like a customer ID). It's important for keeping data organized.
* Foreign Key: This key links a row in one table to a row in another table. It's like a link that says, "This order belongs to this customer."
Let me know if you'd like more examples or have any other questions!

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous