본문 바로가기
English
Joining two tables

To use data from both tables at once, you join them. An INNER JOIN pairs up rows that match on a key — here, the order's customer_id with the customer's id:

SELECT customer.name, orders.total
FROM customer
INNER JOIN orders ON customer.id = orders.customer_id;

When a column name could come from either table, write table.column so it is clear.

INNER JOIN combines rows whose key values match

교재 자료

로그인 또는 계정 만들기

IGCSE, A-Level & AP