G-3180: Always specify column names instead of positional references in ORDER BY clauses.
Major
Changeability, Reliability
Reason
If you change your select
list afterwards the order by
will still work but order your rows differently, when not changing the positional number. Furthermore, it is not comfortable to the readers of the code, if they have to count the columns in the select
list to know the way the result is ordered.
Example (bad)
1 2 3 4 5 6 |
|
Example (good)
1 2 3 4 5 6 7 8 |
|