SQL Joins · Question 4 · Easy
In A LEFT JOIN B, what happens to a row of A that has no matching row in B?
- It is dropped from the result
- It is paired with every row of B
- It appears once, with B's columns copied from the previous matched row
- It appears once, with NULL in every column that comes from B
Answer and explanation
Answer: D. It appears once, with NULL in every column that comes from B
Explanation: A left join keeps every row of the left table. When there is no match, the right table's columns are filled with NULL so the left row is not lost.
Previous: Table Colours: colour Red Blue Green Table Sizes: size S M How many rows does… · Next: Table Teams: team_id | team | city 1 | CSK | Chennai 2 | MI | Mumbai 3 | RCB |…
Practise sql joins
Try a fresh set of sql joins questions with an explanation after every answer, free and without signing up: SQL Joins practice. Or sit a full placement mock test.
More sql joins questions
- Table Teams: team_id | team | city 1 | CSK | Chennai 2 | MI | Mumbai 3 | RCB |…
- Table Teams: team_id | team | city 1 | CSK | Chennai 2 | MI | Mumbai 3 | RCB |…
- Table Colours: colour Red Blue Green Table Sizes: size S M How many rows does…
- Table Teams: team_id | team | city 1 | CSK | Chennai 2 | MI | Mumbai 3 | RCB |…
- Table Staff: emp_id | name | manager_id 1 | Nandini | NULL 2 | Omkar | 1 3 |…
- Which of these is equivalent to A RIGHT JOIN B ON A.k = B.k (ignoring column…
- Table Teams: team_id | team | city 1 | CSK | Chennai 2 | MI | Mumbai 3 | RCB |…
- Table Teams: team_id | team | city 1 | CSK | Chennai 2 | MI | Mumbai 3 | RCB |…
- Table Teams: team_id | team | city 1 | CSK | Chennai 2 | MI | Mumbai 3 | RCB |…
- Table Learners: name | city Isha | Delhi Jatin | Delhi Kiran | Pune Leela |…
More sql practice
Aggregates & GROUP BY · Subqueries & CTEs · Window Functions · NULL Handling · SQL Functions & CASE · UNION, INTERSECT & EXCEPT · Tables, Keys & Constraints · DML & Transactions
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge