display records from 5 to 9 using rowid or rownum
Answers were Sorted based on User's Feedback
Answer / vinay shankar
select * from emp
where rownum <=9
minus
select * from emp
where rownum <5
Is This Answer Correct ? | 31 Yes | 6 No |
Answer / chiru
select * from (select rownum r ,a.* from emp a ) where r between 5 and 9
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / ramaraju
select
ename
from
emp
order by ename
offset 4 rows
fetch next 5 rows only;
try this answer oracle 12c introduced offset fetch rows.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / hari
select * from (select rownum rm,id from emp where rownum<=9) where rn >=5)
Is This Answer Correct ? | 4 Yes | 5 No |
Answer / satya
select empno,ename,sal from emp
group by rownum,empno,ename,sal
having rownum between 5 and 9;
Is This Answer Correct ? | 2 Yes | 9 No |
Which query operators in sql is used for pattern matching?
Why select is used in sql?
what are the differences between require and include, include_once and require_once? : Sql dba
What is the difference between microsoft access and sql server?
How do you sort in sql?
Is join same as left join?
What is pl sql package?
What is nested table in pl sql?
What is sql deadlock?
Difference between DBMS and RDBMS...CODD's rules
Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?
How many types of keys are there in sql?