[SQL] (repost) Help understanding expressions in order by clause

2007-10-25 Thread Steve Midgley
Hi, (I posted this to the list on 10/25 but it didn't seem to get distributed - apologies if it did and I'm actually double posting right now..) I've read on this list about some pretty powerful examples of using expressions in order by clauses to sort according to very complex rules. I

Re: [SQL] (repost) Help understanding expressions in order by clause

2007-10-25 Thread Tom Lane
Steve Midgley [EMAIL PROTECTED] writes: select * from test_order order by id 3, email --sql end Putting the expression id 3 causes the id of 3 to sort to the TOP of the list. This statement does the same thing: select * from test_order order by id = 3 DESC, email I know there is a