Find unused columns in SELECT statements
Find unused columns in SELECT statements similar to finding unused variables.
Use case: I have some subqueries where I expanded SELECT * to now explicitly specify column names (best practice). However, only some of the columns and then used in the query process or results. I thus want the ability to have the unused columns removed from the SELECT statement.
27
votes
![](https://secure.gravatar.com/avatar/5dd6d7b3755adb45faeb5b7236aca82d?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Tsahi commented
Or mark them in some way, such as grayed out.