diff options
Diffstat (limited to 'lib/arel/visitors/oracle.rb')
-rw-r--r-- | lib/arel/visitors/oracle.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/arel/visitors/oracle.rb b/lib/arel/visitors/oracle.rb index 375f7dbfe9..1441a20dbc 100644 --- a/lib/arel/visitors/oracle.rb +++ b/lib/arel/visitors/oracle.rb @@ -25,9 +25,8 @@ module Arel SELECT * FROM ( SELECT raw_sql_.*, rownum raw_rnum_ FROM (#{sql}) raw_sql_ - WHERE rownum <= #{offset.expr.to_i + limit} ) - WHERE #{visit offset} + WHERE raw_rnum_ between #{offset.expr.to_i + 1 } and #{offset.expr.to_i + limit} eosql end |