Re: sql order but move some rows bottom [message #182441 is a reply to message #182432] |
Sun, 04 August 2013 17:37 |
Luuk
Messages: 329 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 04-08-2013 17:49, nawfer wrote:
>> y before 100:
>> ORDER BY
>> (CASE WHEN column2 = 100 THEN 2 ELSE 0 END + CASE WHEN column3='Y' THEN
>> 1 ELSE 0 END) ASC, column1 ASC, column2 ASC
>
> small curiosity
> the above code respect at a simple order
>
> ORDER BY column1 ASC, column2 ASC
>
>
> change the performance (example - 5%)or is insignificant the difference?
>
Sorry, my English is not good enough to understand what you mean .....
Could you rephrase the question?
|
|
|