SQL Statement question...

I know in SQL Server you can also ORDER BY ordinal position, such as:
Code:
SELECT Field1, Field2 FROM Table1
ORDER BY 1 asc, 2 desc -- or is it 0 asc, 1 desc?

This comes in handy if you have a complex SELECT, such as a CASE statement or subselect.

-ner
 
Back
Top