Salesforce
Interview Core Track · Easy · 15 min
7. What's the difference between an inner and a full outer join
A **full outer join** returns all rows from both tables, including any unmatched rows, whereas an **inner join** only returns rows that match the join condit...
Company labels are directional practice context, not official interview guidance.
Objective
Practice joins through a Salesforce-tagged business scenario.
Approach
Use this track to improve speed, edge-case handling, and accuracy under timed conditions.
Company context
Company labels are directional practice context, not official interview guidance.
A **full outer join** returns all rows from both tables, including any unmatched rows, whereas an **inner join** only returns rows that match the join condition between the two tables. For an example of each one, say you had sales data exported from Salesforce's Salesforce CRM stored in a datawarehouse which had two tables: sales and salesforce_customers. **INNER JOIN**: retrieves rows from both tables where there is a match in the shared key or keys. SELECT * FROM sales INNER JOIN salesforce_customers ON sales.customer_id = salesforce_customers.id This query will return rows from the sales and salesforce_customers tables that have matching customer id values. Only rows with matching customer_id values will be included in the results. **FULL OUTER JOIN**: retrieves all rows from both tables, regardless of whether there is a match in the shared key or keys. If there is no match, NULL values will be returned for the columns of the non-matching table. Here is an example of a SQL full outer join using the sales and salesforce_customers tables: SELECT * FROM sales FULL OUTER JOIN salesforce_customers ON sales.customer_id = salesforce_customers.id ---
salesforce_customers
sales
SQL workspace
Run queries against the protected question data, then submit once the result shape looks right.
Sign in to run SQL
Create a free account or sign in before running queries against protected question data.