I'm attempting to do something similar to this question. I have this table:
tab_id
is the second column. order_in_tab
is the fourth column.
I want to order by tab_id
equal to 2
first, then rest of tab_id
ascending, then order_in_tab
ascending.
select *
from cam_to_tab_mapping
where unit_id='90013550'
order by (tab_id='2') asc, tab_id asc, order_in_tab asc
However, it says Incorrect syntax at '='.
. I'm a complete SQL newbie, so I'm not sure what is wrong (or if I'm misunderstanding the linked solution from above).