[Solved] Take out nearest record of emp.sal which are >50.000


Oracle:

select *
from
(
    select *
    from emp
    where sal > 50000
    order by sal desc
)
where rownum <= 2

MySQL:

select *
from
(
    select *
    from emp
    where sal > 50000
    order by sal desc
)
limit 2

solved Take out nearest record of emp.sal which are >50.000