NATURAL JOIN
syntax is anti-pattern:
- The purpose of the query is less obvious;
- the columns used by the application is not clear
- the columns used can change "unexpectedly"
- The syntax goes against the modularity rule, about using strict typing whenever possible. Explicit is almost universally better.
Because of this, I don't recommend the syntax in any environment.
I also don't recommend mixing syntax (IE: using both NATURAL JOIN
and explicit INNER/OUTER JOIN syntax) - keep a consistent codebase format.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…