write the sql query to display 5th and 10th row in a table?

Answers were Sorted based on User's Feedback



write the sql query to display 5th and 10th row in a table?..

Answer / lakshmi reddy

select * from(select emp.*,rownum r from emp) where r=5 or r=10

Is This Answer Correct ?    8 Yes 1 No

write the sql query to display 5th and 10th row in a table?..

Answer / kart

select * from (select rownum as rn,aone.* from aone)
where rn in(5,10);

Is This Answer Correct ?    6 Yes 0 No

write the sql query to display 5th and 10th row in a table?..

Answer / gautam ramteke

select *
from(select rt.*,rownum r from (select * from gpr_employee
order by hire_date)rt)
where r in (5,8);

Is This Answer Correct ?    2 Yes 0 No

write the sql query to display 5th and 10th row in a table?..

Answer / gopal

By using rank or dense_rankl()

Is This Answer Correct ?    1 Yes 0 No

write the sql query to display 5th and 10th row in a table?..

Answer / harish

select * from emp where rownum<=&n;
if u give 5 insted of 'n' we get 5th record...

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Cognos Interview Questions

I have Date,product,Quantity_Sold columns and I want Product, MTD(month Till date),YTD(Year Till Date) as output. Can anyone help me with the logic in getting MTD i.e quantity sold from 1st of this month to till date (i.e. 01- 11-2013 to 26-11-2013) and YTD i.e QTD sold from 1st date of the year to till date(i.e. 01-01-2013 to 26-11-2013). Sample output model: Product MTD YTD

1 Answers   L&T,


im having a value prompt, in that value prompt im having the values as ABC and CDF, i want to hide the select box in that value prompt? is it possible in cognos?

1 Answers   IBM,


what is the difference between a data item and a query item?

2 Answers   Bodhtree, HP,


..Architectural difference between cognos reportnet and cognos8?

3 Answers  


Hi I need real time senarios and how to explain project in the interview pls let me know my email id m.n.prathyusha@gmail.com.Please help me out with this pls pls pls muthireddi@gmail.com

0 Answers  






What is cognos connection?

0 Answers  


what is the difference between group span and level span

1 Answers   Satyam,


----------0Diff b/w Report Functions and Database functions?

1 Answers   IBM,


Explain what is the difference between microstrategy and cognos reporting tool?

0 Answers  


7. What is performance tuning?

0 Answers  


write the sql query to display 5th and 10th row in a table?

5 Answers   CTS, IBM,


what is dimention?explain dimentable with example?

3 Answers   Syntel,


Categories