Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 / ajit

select Ename, empno, rn
from (select rownum rn, ename, empno
from emp)
where rn between &gno and &gno

Is This Answer Correct ?    0 Yes 0 No

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

Answer / ajit nayak

select rn, ename
from (select rownum rn, ename
from emp)
where rn between 3 and 7;

Is This Answer Correct ?    0 Yes 0 No

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

Answer / sagar sananse

with admitCTE(AdmissionId,PatientId,RN) as
(
select AdmissionId,PatientId,Row_number() over (order by AdmissionId) as RN from tempadmit
)
select * from admitCTE where RN between 101 and 120

Is This Answer Correct ?    0 Yes 0 No

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

Answer / jayanth

select * from (select a.*, row_number() over (order by empno) rn from emp a) where rn between 100 and 120;

Is This Answer Correct ?    0 Yes 0 No

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

Answer / nancy

select * from (
select tn.*, rownum rd from emp tn ) where rd between 100 and 200;

or

select * From (select tn.* from emp tn where rownum <201
minus
select tn.* from emp tn where rownum <100)

Is This Answer Correct ?    0 Yes 0 No

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

Answer / manjunath

select level from dual connect by level<=150
minus select from dual connect by level<=120;

Is This Answer Correct ?    0 Yes 0 No

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

Answer / sravan

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

Is This Answer Correct ?    13 Yes 14 No

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

Answer / bhargav

SELECT * FROM
(
SELECT Row_Number() OVER (ORDER BY emp_id, emp_name) as
emp_name
FROM employees
) as a
where rowid >100 AND rowid<121

Is This Answer Correct ?    0 Yes 1 No

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

Answer / gourav

SELECT * FROM EMPLOYEES
WHERE EMPLOYEE_ID BETWEEN 120 AND 150;

Is This Answer Correct ?    2 Yes 5 No

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

Answer / sum

select * from employees where rownum between 100 and 120

Is This Answer Correct ?    2 Yes 15 No

Post New Answer

More SQL PLSQL Interview Questions

Is nosql relational?

0 Answers  


Does inner join remove duplicates?

0 Answers  


what is self join and how it works??

2 Answers   Infosys,


what is schema? : Sql dba

0 Answers  


What is user define exception and example

1 Answers   HP, KP,


What is execute immediate?

0 Answers  


Is join same as left join?

0 Answers  


i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5

1 Answers  


what is meant by databases

4 Answers  


What is sql partition?

0 Answers  


Is a secondary key the same as a foreign key?

0 Answers  


What is sql mysql pl sql oracle?

0 Answers  


Categories