You can join tables with common column names with
t1 JOIN t2 USING ( col )
But this leads to a trap!
With
t1 JOIN t2 USING ( c1 ) JOIN t3 USING ( c2 )
With c2 in just t2 and t3 this works
But add c2 to t1 in the future it breaks 😖
@lukaseder.bsky.social demos
Discover the pitfalls of using SQL's NATURAL JOIN and JOIN USING syntax. Learn best practices for joining tables in production queries.