1. Why is it so that the given query worked :"select * from (select rownum rnum,a.* from emp a) where rnum=70; "while this query dint work :"select * from (select rownum,a.* from emp a) where rownum=70;"2. as i've read that rownum can work only for < and or >=, then why the query worked for rnum=70

Questions by csr21   answers by csr21

Showing Answers 1 - 7 of 7 Answers

Lavanya Chowdary

  • May 6th, 2007
 

It will work for = operator
But it will work for the first row in the table pls check that

  Was this answer useful?  Yes

ROWNUM returns a number indicating the order in which the row was retrieved from the table, but this is not always the order in which a row is displayed. 

If you directly user rownum in the outer query it considers the rownum of outer query not that of inner query.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions