迄今为止网上见到的能让我很好理解ROWNUM的一段话:
Oracle's ROWNUM is a sequence number generator. It always starts with 1. The sequence numbers are assigned to each row as they are selected. So when you say "ROWNUM > 1" , you are implicitly asking oracle to assign rownumbers starting from 2, which it cannot do and so you wouldn't get any rows. For testing, try "ROWNUM >=1" where you are asking the rownum to be assigned from 1 and all the rows will get selected.
Summary: Any condition which involves "ROWNUM" should ask Oracle to start assigning rownumbers starting from "1". All other conditions fail.
Oracle's ROWNUM is a sequence number generator. It always starts with 1. The sequence numbers are assigned to each row as they are selected. So when you say "ROWNUM > 1" , you are implicitly asking oracle to assign rownumbers starting from 2, which it cannot do and so you wouldn't get any rows. For testing, try "ROWNUM >=1" where you are asking the rownum to be assigned from 1 and all the rows will get selected.
Summary: Any condition which involves "ROWNUM" should ask Oracle to start assigning rownumbers starting from "1". All other conditions fail.