G-3200: Avoid using an ON clause when a USING clause will work.
Minor
Maintainability
Reason
An on
clause requires more code than a using
clause and presents a greater possibility for making errors. The using
clause is easier to read and maintain.
Note that the using
clause prevents the use of a table alias for the join column in any of the other clauses of the sql statement.
Example (bad)
1 2 3 4 5 |
|
Example (good)
1 2 3 4 5 |
|