We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
TL;DR: It's bad style and you should not even start with it.
The SSF (Select 'Star' From) is a typical code smell. Usually done out of laziness of the writer. The problem here is that the order of columns can change over time given structural changes in the table. Using an explicit list of selected columns gives you better control over the expected result (and sequence of columns). Additionally, you can exactly define which set of columns instead of all (*) you'd like to have in the result.
Tools like SQL prompt offer you functionality to expand the wildcard into proper column names.
Revising the Select Query I
You are viewing a single comment's thread. Return to all comments →
Hi,
TL;DR: It's bad style and you should not even start with it.
The SSF (Select 'Star' From) is a typical code smell. Usually done out of laziness of the writer. The problem here is that the order of columns can change over time given structural changes in the table. Using an explicit list of selected columns gives you better control over the expected result (and sequence of columns). Additionally, you can exactly define which set of columns instead of all (*) you'd like to have in the result.
Tools like SQL prompt offer you functionality to expand the wildcard into proper column names.
See here: https://documentation.red-gate.com/codeanalysis/best-practice-rules/bp005 for some ideas.