On 16 Nov 2006 11:04:15 +0100,
Harald Fuchs <
hf1110x@protecting.net> wrote:
Why so complicated?
SELECT whatever FROM foo ORDER BY name = 'Other', name
This is by far the simplest (and intelligent) of them all. And it will use a single scan of the underlying table (or index, if used), so should prove to be faster than the other UNION schemes.
Another tweak: If possible, use the integer column (ID) instead of the Name column.
Regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com