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

Is pl sql different from sql?

0 Answers  


What is bitemporal narrowing?

0 Answers  


Use The Implicit cursor to Query The Department table information Where Deptno is 30.check,if no record was found then print "Record Was Not Found".Else Print Deptname And Ename.Dept table Have Dname Varchar2(20),Deptno Number,EnameVarchar2(20).Please Answer In 2 mins,with in Maximum 15 lines.

5 Answers   Wipro,


What is the difference between an inner join and an outer join?

0 Answers  


Why are cursors used?

0 Answers  






what the meaning of sql

8 Answers  


What is meant by temporal data?

0 Answers  


Where is pl sql used?

0 Answers  


In a package if we have 10 procedures or functions,How to know which will execute first?

1 Answers   Sollet Soft,


IF i write before / after insert / update trigger and i do rollback what will happen?

5 Answers   KPIT,


What can you do with pl sql?

0 Answers  


Hello All, Could any well write a query for the following scenario. Account(table name) No Name Amount 1 ABCD 2000.00 2 DEFG -2000.00 3 GHIJ 3000.50 4 JKLM 4000.00 5 MNOP 6000.00 O/p Should be in this format No Name Credit Debit 1 ABCD 2000.00 0 2 DEFG 0 -2000.00 3 GHIJ 3000.50 4 JKLM 0 -4000.00 5 MNOP 6000.00 o could any one give appropriate query for this Thnks in Advance Suneel Reddy

6 Answers   Target,


Categories