标签:
//一般的查询sql
String sql="select a.id,a.reminddate,a.reminname from t_remindsettings a where a.status = 1 order by a.id DESC";
// 分页sql加上(套用)一般查询sql
String fenyeSql="select * from (select rownum rn, t1.* from ("+sql+") t1 where rownum <="+(pageNum*rowsPerPage)+" ) t2 where t2.rn>"+(pageNum-1)*rowsPerPage;
//进行dao层sql查询
标签:
原文地址:http://my.oschina.net/u/2467394/blog/522480