i need query should display exact match first , display rest in ascending order.
for example , have 3 elements namely
ms office office ab office now search text office list should display
office ab office ms office all above 3 records available in db .
i cant ascending directly ab office comes first in list .
i writing query android, direct query on android appreciated.
thanks, gobi.s
select office_name your_table order case when office_name = 'office' 1 when office_name = 'ab office' 2 when office_name = 'ms office' 3 end
Comments
Post a Comment