What is a join in SQL?

A join is a SQL operation that combines rows from two or more tables into a single result set based on a related column between them. It is the mechanism that lets you reassemble normalized data that has been split across multiple tables.

Key Points

Example

To display each order along with the customer's name, you join the orders table to the customers table on customer_id, since the customer's name isn't stored directly in the orders table.

SELECT o.order_id, c.customer_name, o.total
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id;

Interview Tip

A concise interview answer is

A join combines rows from two or more tables into one result set based on a shared column, usually a foreign key relationship. Since normalized databases split related data across multiple tables, joins are how you reassemble it -- for example, joining orders to customers to show the customer's name alongside each order.

Last updated: 11 November 2026

Previous question: What are the types of SQL statements?

Next question: What is the purpose of the SELECT statement in MySQL?

More SQL interview questions

All SQL questions