I have to limit to 2 rows. But can't do it for a SQL-Fetch.
select *
from employee;
You can use something like this:
select *
from
( select *
from emp
order by data desc )
where ROWNUM <= 2;
You can change the query as:
select *
from
top_n_test
order by
num
fetch first 3 rows only;
The select first n rows only selects the first n rows.
Well, the simplest way is to
select *
from employee
where rownum <= 2;
but the question is what exactly do you want to do with that.