oracle sql 分页

string sql = "(select * from CorporationMainTable2 order by rowid) ta";
       sql = "(select rownum rn , ta.* from " + s + " where  rownum<" + (end + 1) + ")";
       sql = "select * from " + s + " where rn >= " + begin;

 

 

 

select *
  from (select rownum rn, ta.*
          from (select *
                  from CorporationMainTable
                 where *
                 order by CreditID desc) ta
         where rownum <= 4)
 where rn > 0

 

posted @ 2011-08-01 20:15  小さいです哥  阅读(...)  评论(... 编辑 收藏