Expected JOIN USING facts are assertions only.

highlighted = computed this step

Honest by construction

Expected JOIN USING facts are assertions only.

compiler is source of truth\text{compiler is source of truth}

Render checked rows

The guarded JOIN USING example renders 5 checked matched rows after recomputation.

checked rows=5\text{checked rows}=5

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 tableorder_idcustomer_idnote110new220rush320gift4NULLdraft Honest by construction: right tablecustomer_idnamenote10Adavip20Benstandard20Bennyduplicate30CyprospectNULLUnknownmissing candidate key comparisonsleftSourcerightSourceleftKeyrightKeymatched001010yes011020no021020no031030no0410NULLno102010no112020yes122020yes132030no1420NULLno202010no212020yes222020yes232030no2420NULLno30NULL10no31NULL20no32NULL20no33NULL30no34NULLNULLno JOIN USING output rowscustomer_idleft.order_idleft.noteright.nameright.note101newAdavip202rushBenstandard202rushBennyduplicate203giftBenstandard203giftBennyduplicate ON join contrast rowsleft.order_idleft.customer_idleft.noteright.customer_idright.nameright.note110new10Adavip220rush20Benstandard220rush20Bennyduplicate320gift20Benstandard320gift20Bennyduplicate JOIN USING factsfactvalueleftRowCount4rightRowCount5candidatePairCount20matchingPairCount5matchedLeftRows3duplicateMatchRows2nullKeyCandidatePairs8usingKeyAppearsOnceyesduplicateNonKeyNames[note]outputColumnCount5onOutputColumnCount6rowOrderleft_source_then_right_source

Try to tamper

Wrong expected facts, derived sidecars, missing keys, duplicate columns, bools, floats, and unsafe cells fail closed.

tamper rejected\text{tamper rejected}

Summary

This book shows exact finite JOIN USING on one same-named key only.

scoped JOIN USING model\text{scoped JOIN USING model}