When you use rownum < 2 you are effectively selecting only one row and
stopping after that. Also This is not the right way to do it, the right way
is to use inline view with rownum condition and order by in outer query.

In your scenario, oracle will retrieve 2 rows and then sort them. These two
rows can be anything and are not affected by the order by clause YET.

Ordering one row reminds of an assignment we had in our Graphics class, we
were asked to implement object rotation, a colleague complained his program
is right, but the object wasn't getting rotated. When we had a look on his
screen, he was trying to rotate a circle !

Raj
______________________________________________________
Rajendra Jamadagni              MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!


-----Original Message-----
Sent: Thursday, May 30, 2002 4:08 PM
To: Multiple recipients of list ORACLE-L


problem is it works if we have rownum < 3(or any value >2) and only fails if
we use rownum < 2...

*********************************************************************2

This e-mail message is confidential, intended only for the named recipient(s) above 
and may contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank you.

*********************************************************************2

Reply via email to