mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修正db2 limit语句 bug #401
This commit is contained in:
@@ -127,10 +127,8 @@ public class PagerUtils {
|
||||
|
||||
SQLAggregateExpr aggregateExpr = new SQLAggregateExpr("ROW_NUMBER");
|
||||
SQLOrderBy orderBy = select.getOrderBy();
|
||||
if (orderBy != null) {
|
||||
aggregateExpr.setOver(new SQLOver(orderBy));
|
||||
select.setOrderBy(null);
|
||||
}
|
||||
aggregateExpr.setOver(new SQLOver(orderBy));
|
||||
select.setOrderBy(null);
|
||||
|
||||
queryBlock.getSelectList().add(new SQLSelectItem(aggregateExpr, "ROWNUM"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user