JOIN USING examples are tiny finite-table transforms; SQL dialect completeness, type coercion, optimizer behavior, execution cost, indexing, output ordering guarantees, and database-product claims are out of scope.
Honest by construction: left table order_id customer_id note 1 10 new 2 20 rush 3 20 gift 4 NULL draft
Honest by construction: right table customer_id name note 10 Ada vip 20 Ben standard 20 Benny duplicate 30 Cy prospect NULL Unknown missing
candidate key comparisons leftSource rightSource leftKey rightKey matched 0 0 10 10 yes 0 1 10 20 no 0 2 10 20 no 0 3 10 30 no 0 4 10 NULL no 1 0 20 10 no 1 1 20 20 yes 1 2 20 20 yes 1 3 20 30 no 1 4 20 NULL no 2 0 20 10 no 2 1 20 20 yes 2 2 20 20 yes 2 3 20 30 no 2 4 20 NULL no 3 0 NULL 10 no 3 1 NULL 20 no 3 2 NULL 20 no 3 3 NULL 30 no 3 4 NULL NULL no
JOIN USING output rows customer_id left.order_id left.note right.name right.note 10 1 new Ada vip 20 2 rush Ben standard 20 2 rush Benny duplicate 20 3 gift Ben standard 20 3 gift Benny duplicate
ON join contrast rows left.order_id left.customer_id left.note right.customer_id right.name right.note 1 10 new 10 Ada vip 2 20 rush 20 Ben standard 2 20 rush 20 Benny duplicate 3 20 gift 20 Ben standard 3 20 gift 20 Benny duplicate
JOIN USING facts fact value leftRowCount 4 rightRowCount 5 candidatePairCount 20 matchingPairCount 5 matchedLeftRows 3 duplicateMatchRows 2 nullKeyCandidatePairs 8 usingKeyAppearsOnce yes duplicateNonKeyNames [note] outputColumnCount 5 onOutputColumnCount 6 rowOrder left_source_then_right_source