say i have a select and i want a certain value (like i make select on users and i want ccertain user to be first) is it possible that in the recordset the certain value wil lbe first?
ORDER BY column = 5 DESC
column = 5 evaluates to 1 if the column's value is 5, otherwise it evaluates to 0
second what if i want it in a certain row of the result say row 6?
add 5 dummy rows?
what do you want to achieve?
i did :
select * from users where find_in_set('2',users.dep_list) order by case when user_name='def' then 0 order by case asc end
and always the user "def" was last in the recordset instead of first althoguht i gave it the zero value 🙁
ORDER BY column = 5 DESC means ORDER BY user_name = 'def' DESC in your case
id idd it itt worked ok i just wad s curious about the other way🙂