oracle分页大于等于小于分页临界点
oracle分页大于等于小于分页临界点正确的:Sql代码SELECT * FROM (SELECT A.*,ROWNUM RN FROM (select * from t_agent t where t.agent_parent = 20020and t.agent_state = 0) A WHERE ROWNUM <= 22) WHERE RN > 0;错误的:这样只会取出21条数据,到临界点,比如有22条数据,下一页不会显示一条数据,只会看到一页,21条数据,少了一条。Sql代码SELECT * FROM (SELECT A.*,ROWNUM RN FROM (select * from t_agent t where t.agent_parent = 20020and t.agent_state = 0) A WHERE ROWNUM < 22) WHERE RN >= 0;