0
0
SQLquery~5 mins

LEFT JOIN execution behavior in SQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does a LEFT JOIN do in SQL?
A LEFT JOIN returns all rows from the left table and the matching rows from the right table. If there is no match, the result will contain NULLs for columns from the right table.
Click to reveal answer
beginner
In a LEFT JOIN, what happens when there is no matching row in the right table?
The query returns the left table's row with NULL values for the right table's columns.
Click to reveal answer
intermediate
How does SQL execute a LEFT JOIN internally?
SQL scans the left table first, then for each row, it looks for matching rows in the right table. If matches exist, it combines them; if not, it fills right table columns with NULL.
Click to reveal answer
beginner
What is the difference between LEFT JOIN and INNER JOIN in terms of output?
LEFT JOIN returns all rows from the left table regardless of matches, while INNER JOIN returns only rows where there is a match in both tables.
Click to reveal answer
intermediate
Can a LEFT JOIN return duplicate rows? Why or why not?
Yes, if the right table has multiple matching rows for a single left table row, the LEFT JOIN will return multiple rows for that left row, one for each match.
Click to reveal answer
What will a LEFT JOIN return if the right table has no matching rows?
AAll rows from the left table with NULLs for right table columns
BNo rows
COnly rows with matching keys
DAll rows from the right table
Which table's rows are always fully included in a LEFT JOIN result?
ABoth tables equally
BRight table
CLeft table
DNeither table
If a left table row matches multiple right table rows, how many rows appear in the LEFT JOIN result for that left row?
AOne
BMultiple, one per matching right row
CDepends on the database
DZero
What SQL keyword is used to perform a LEFT JOIN?
AINNER JOIN
BFULL JOIN
CRIGHT JOIN
DLEFT JOIN
Which of these is true about NULLs in a LEFT JOIN result?
ANULLs appear in right table columns when no match
BNULLs appear in left table columns when no match
CNULLs never appear in LEFT JOIN results
DNULLs appear in both tables always
Explain how a LEFT JOIN works and what its output looks like.
Think about what happens when there is no matching row on the right.
You got /4 concepts.
    Describe the difference between LEFT JOIN and INNER JOIN in SQL.
    Focus on which rows appear in the result.
    You got /4 concepts.