Oracle: Top 5 entries with LIMIT / ROWNUM
In short: the correct way is to nest a select with a ROWNUM < X around it.
Example:
select *
from (
select *
from emp order by sal desc
)
where ROWNUM <= 5;
In more detail: Ask Tom
In short: the correct way is to nest a select with a ROWNUM < X around it.
Example:
select *
from (
select *
from emp order by sal desc
)
where ROWNUM <= 5;
In more detail: Ask Tom
Thank you for useful information.