A table has 150 records. How do you retrieve 100th row to
120th row from that table ?

Answers were Sorted based on User's Feedback



A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / laks

select * from emp where rownum<121
minus(select * from emp where rownum<101)

Is This Answer Correct ?    34 Yes 4 No

A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / swapna

select * from emp where rownum<121
minus (select * from empwhere rownum<100);

Is This Answer Correct ?    11 Yes 6 No

A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / d

select *
from (select rownum row_num
,tab.*
from table tab)
where row_num between 100 and 120

Is This Answer Correct ?    7 Yes 2 No

A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / subhradeep

select * from employees where rownum<102
minus(select * from employees where rownum<81)

Is This Answer Correct ?    2 Yes 0 No

A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / gourav josih

select *from employees
where employee_id between 120 and 150;

Is This Answer Correct ?    4 Yes 2 No

A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / nayana

select * from emp where rownum<121
minus(select * from emp where rownum<100)

Is This Answer Correct ?    1 Yes 0 No

A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / arif hussain

select * from (
select ROW_NUMBER() over (order by tablename.columnname)as ronno,* from tablename )x
where ronno between 100 and 120

Is This Answer Correct ?    1 Yes 0 No

A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / mohan

select * from table_name where rownum between 100 and 120;

Is This Answer Correct ?    2 Yes 2 No

A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / anjana

Select *,row_number over(partition by departmentid order by empid)as rowid from employeeDept
where rowid between 100 and 120

Is This Answer Correct ?    1 Yes 1 No

A table has 150 records. How do you retrieve 100th row to 120th row from that table ?..

Answer / srinivas

select * from(select <table_name>.*,rownum rn from <Table_name>) where rn between 100 and 120

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

How do I sort a table in sql?

0 Answers  


How to convert comma separated string to array in pl/sql?

0 Answers  


how to calculate expressions with sql statements? : Sql dba

0 Answers  


can i give user defined exception in a package

2 Answers  


What is the basic difference between a sql and stored procedure ?

2 Answers   L&T,






Why truncate is used in sql?

0 Answers  


Which one is better sql or oracle?

0 Answers  


What is update query?

0 Answers  


How can triggers be used for the table auditing?

0 Answers  


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

0 Answers  


What is faster join or subquery?

0 Answers  


How do I find duplicates in two columns?

0 Answers  


Categories