Intermediate Database Management Systems
Q74 / 100

What is an anti-join in SQL?

Correct! Well done.

Incorrect.

The correct answer is C) A query pattern (typically using NOT EXISTS or LEFT JOIN ... WHERE right.col IS NULL) that returns rows from one table that have no matching rows in another table

C

Correct Answer

A query pattern (typically using NOT EXISTS or LEFT JOIN ... WHERE right.col IS NULL) that returns rows from one table that have no matching rows in another table

Explanation

Anti-joins find "rows in A without a match in B" — for example, customers who have never placed an order. NOT EXISTS and LEFT JOIN/IS NULL are common implementations, and the optimizer can rewrite NOT IN into an efficient anti-join plan.

Progress
74/100