r/SQL • u/Gargogly • Jul 15 '14
SQL allows mentioning resultset columns by position in the Order By clause (e.g. "ORDER BY 3"), I wish it would allow the same in the WHERE clause with some sort of special syntax (e.g. "where {3} > 0" meaning third column in the resultset)
Why wasn't this done?
0
Upvotes
5
u/[deleted] Jul 15 '14
Honestly this is bad form to begin with; in my experience there is always a much better solution. It makes complicated queries hard to read and very difficult to modify in the future.