I am new to databases and have started learning SQL. I am trying to convert a MySQL query to work with oracle database.
I am using Oracle 11g express edition and have tried many different answers but failed miserably. I don't know why oracle has no limit clause in its SQL
This is what it looks like in MYSQL:
select *
from emp
order by sal desc
limit 1,1
I have seen many answers for how to convert limit by using rownum in oracle but couldn't find how to write offset.
I got a solution from StackOverflow:
select * from emp
order by sal desc
OFFSET 1 ROW FETCH NEXT 1 ROW ONLY;
but it is giving the following error:
ORA-00933: SQL command not properly ended
Can anyone please suggest me some simple solution. Thanks in Advance.