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

SELECT * from subquery? #18

Closed
erthalion opened this issue Sep 11, 2017 · 2 comments
Closed

SELECT * from subquery? #18

erthalion opened this issue Sep 11, 2017 · 2 comments

Comments

@erthalion
Copy link

Hi

First of all thanks for this tool. I have a question - sqlcheck identifies the SELECT * anti-pattern in the following query:

SELECT * FROM (SELECT column1, column2 FROM some_table);

But in this particular case a list of columns already limited by subquery. Is it valid to reference this anti-pattern in such queries (i.e. are there any situations when it still can be bad)?

@jarulraj
Copy link
Owner

That's an interesting question @erthalion. I am not sure when such a query would be used. Unless the nested sub-query changes, I think that SELECT * is not an issue in this example.

@jarulraj
Copy link
Owner

@erthalion Please reopen this issue if you would like to continue the conversation. Also, do consider trying out the latest release: https://github.com/jarulraj/sqlcheck/releases

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

2 participants