We are executing openquery from SQL server to Oracle:
select * from emp where rownum<5
Its equivalent is:
with cte as ( select *, row_number() over(order by <column>) as rownum from emp ) select * from cte where rownum < 5
SQL server does not have rownum pseudo column.
So if we would like to fetch row number along with select statement we have to use a ranking function ROW_NUMBER or Top 1.