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;";

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章