In article <3DF5C2AD.4090706@stripped>,
Tariq Murtaza <tariq@stripped> writes:
> Hi All,
> I am wondering how to do that.....
> Suppose we have data like this below
> ID Category
> -------------------------
> 1 Software Engg
> 2 Engg
> 62 Commerce
> 87 Ecommerce
> 45 physics
> 95 chemistry
> 6 biochemistry
> 7 math
> 5 Others
> I want to achieve recordset like below (sorting category by Name and
> including 'Others' at the end),
> I want to do that by single query ;), any idea???
> ID Category
> ------------------------
> 6 biochemistry
> 62 Commerce
> 95 chemistry
> 2 Engg
> 87 Ecommerce
> 7 math
> 45 physics
> 1 Software Engg
> 5 Others
SELECT id, name
FROM mytable
ORDER BY name = "Others", name;