This is another one of those stupid questions asked during technical interviews that don’t really give an indication of whether you are actually qualified for the job.
Inner join
Say you have one table of CUSTOMERS and one table of ORDERS. Each row in the ORDERS table has a reference (foreign key reference) to a customer id which represents what customer placed that order. If you want to run a query that lists the orders along with the names of the customers who ordered them (since a customer id number itself it pretty useless), you will want to execute a join query:
SELECT CUSTOMERS.NAME, ORDERS.NAME
FROM CUSTOMERS
INNER JOIN ORDERS
ON CUSTOMERS.ID = ORDERS.CUSTOMER_ID
Outer join
If for some reason, you wanted the query results to return all customer name regardless of whether they placed an order, you can use one of two types of OUTER JOINS, in this case, a LEFT JOIN:
SELECT CUSTOMERS.NAME, ORDERS.NAME
FROM CUSTOMERS
LEFT JOIN ORDERS
ON CUSTOMERS.ID = ORDERS.CUSTOMER_ID



