Step: Select with Join

Select with Join

Now that we have 2 tables - customers and countries we can select from both of them in the same query. Such select would following syntax: select <columns> from <TABLE_NAME1> left join <TABLE_NAME2> on <JOIN_CONDITION> expression allows you to insert a record.

For example, this is how you can select from both tables.

SELECT,, as country_name
FROM customers left	JOIN countries
ON customers.countryCode = countries.iso2

Now, try it for yourself. Let's find customers and their country name in the same query.