Free Online Flashcard Deck

4 SQL Joins Free Online FlashCards

Study 4 SQL Joins with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

What does a SQL join do?

Back

A join combines rows from two tables according to a condition, letting a query retrieve related information stored separately.

02
Front

What key relationship commonly connects joined tables?

Back

A common join condition matches a foreign key in one table to the corresponding primary key in another.

03
Front

What does the ON clause specify in a join?

Back

The ON clause specifies the condition that determines which row pairs match.

04
Front

What does JOIN mean when no join type is written?

Back

JOIN by itself means INNER JOIN.

05
Front

Which rows does an INNER JOIN return?

Back

An INNER JOIN returns only row pairs that satisfy the join condition; unmatched rows from either table are omitted.

06
Front

Which rows does a LEFT JOIN preserve?

Back

A LEFT JOIN keeps every row from the left table and adds matching right-table data. Right-side columns are NULL when no match exists.

07
Front

How can a LEFT JOIN find employees without a department match?

Back

Filter for d.department_id IS NULL after a LEFT JOIN to return employees with no matching department.

08
Front

Which rows does a RIGHT JOIN preserve?

Back

A RIGHT JOIN preserves every row from the right table; unmatched rows have NULL in the left-table columns.

09
Front

What does a FULL OUTER JOIN retain?

Back

A FULL OUTER JOIN keeps all rows from both tables, combining matches and filling the other side's columns with NULL for unmatched rows.

10
Front

How many rows can a CROSS JOIN produce from tables of sizes NN and MM?

Back

A CROSS JOIN returns every possible row pair. With NN and MM rows, the result has N×MN \times M rows.

11
Front

How do you join more than two tables?

Back

Chain joins by adding a join and its condition for each relationship needed to retrieve the related data.

12
Front

Why can a join repeat values from one table?

Back

A one-to-many match produces multiple result rows for the one-side record—one for each matching many-side row.