Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JOIN USING triggers a query anti-pattern #61

Open
perdiesman opened this issue Nov 17, 2023 · 0 comments
Open

JOIN USING triggers a query anti-pattern #61

perdiesman opened this issue Nov 17, 2023 · 0 comments

Comments

@perdiesman
Copy link

When doing a join with a using such as:

SELECT t1.col1, t2.col2
FROM t1
    JOIN t2 USING (col1);

this is triggering:

(HIGH RISK) (QUERY ANTI-PATTERN) JOIN Without Equality Check
● Use = with JOIN:
JOIN should always have an equality check to ensure proper scope of records.

I would think that USING would be an equality check as the field values have to match for the join.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant