ORDER BY 1 gives incorrect warning
The following gives the warning "ORDER BY clause with constants". In this statement, "1" is not a constant, but a reference to the 1st column.
SELECT TOP (10) Field1, Field2 FROM MyTable ORDER BY 1 DESC
1
vote
Robert Paulsen
shared this idea