jarulraj/sqlcheck

`SELECT *` from subquery?

erthalion opened this issue · 2 comments

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)?

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.

@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