Comment by twoodfin
4 years ago
The trade-off is that a schema change (adding a column) unrelated to your query can modify its behavior.
Favoring aliases over columns instead has the potential to introduce irresolvable ambiguities as you can’t “qualify” a column alias with a SELECT list or subquery ID the way you can qualify a column by its table/view alias.
No comments yet
Contribute on Hacker News ↗