标签:
String sql="select * from( select e.*,rownum r from( select * from emp order by sal desc )e ) where r between ? and ? ";
String sql="select * from( select e.*,rownum r from( select * from emp order by sal desc )e ) where r between 6 and 10 ";
StringBuilder vs = new StringBuilder();
vs.append("select * from (");
vs.append("select e.*, rownum RNO from (select * from emp order by sal desc) e ");
vs.append(")");
vs.append("where RNO between ? and ? "); //动态的SQL语句。
String sql = vs.toString();
标签:
原文地址:http://www.cnblogs.com/zhaoqingwin/p/5926036.html