Part 70: NATURAL JOIN & USING: Convenience vs Production Fragility
1. The USING Clause
When both tables share the exact same column name:
SELECT * FROM orders JOIN users USING (user_id);
2. Why NATURAL JOIN is an Antipattern
NATURAL JOIN automatically joins on all columns that share the same name:
- If both tables happen to have created_at or status columns, it will silently join on those too!
- A schema migration adding a column can silently break existing queries.
Key Takeaways
- Always use explicit
ON a.id = b.a_idin production code.
In Part 71, we enter Module 8 to explore Subqueries: Scalar, Column, and Table Subqueries!

