mysql odps oracle sqlserver 分页

private static final String MYSQL_LIMIT_SQL_DIRTY = "select * from %s where %s limit %s,%s";

private static final String HIVE_LIMIT_SQL_DIRTY = "select * from %s where %s limit %s";

private static final String ORACLE_LIMIT_SQL_DIRTY = "SELECT * FROM (SELECT ROW_.*, ROWNUM ROWNUM_ FROM (SELECT * FROM %s WHERE %s %s) ROW_ WHERE ROWNUM <= %s) WHERE ROWNUM_ >= %s";

private static final String SQLSERVER_LIMIT_SQL_DIRTY = "select * from %s where %s offset %s rows fetch next %s rows only;";

private static final String MAXCOMPTE_LIMIT_SQL_DIRTY = "select * from (select row_number() over() as row_id,* from %s where %s)t where row_id between %s and %s;";

 

你可能感兴趣的:(后台)