problem with rownum
问题 I have a query select * from tablename where rownum =1; This query is giving desired result but if i run select * from tablename where rownum=2; Then this query is giving null result. Any idea why? 回答1: The predicate WHERE rownum=2 can never be true because of the way ROWNUM is assigned. If there are 5 rows in the table, for example, the algorithm would go something like Retrieve the first row from the table. Assign it a rownum of 1. Check this rownum against the predicate, discard Retrieve