JOIN - Combining Tables1 / 10
In SQL, you can use a JOIN to combine different tables. You join them by a common column, like the customer_id in both tables below.
We can match the customer_id in the orders with the customer_id in the customers table to combine the tables and get a result that you couldn't get from either table alone. Try:
We can match the customer_id in the orders with the customer_id in the customers table to combine the tables and get a result that you couldn't get from either table alone. Try:
SELECT customer_name, order_total FROM customers INNER JOIN orders ON customers.customer_id = orders.customer_id;Ctrl+Enter to submit