This content has been marked as final. Show 2 replies
This is not the correct forum, you should have put your question on SQL forum.
However, this is an example of what you want : 5th salary first, then all others rows, ordered by salary.
select case when row_number () over (order by sal)=5 then 0 else 1 end calc_rank ,emp.* from emp order by calc_rank, sal;