    # File lib/active_record/connection_adapters/db2_adapter.rb, line 93
            def add_limit_offset!(sql, options)
              if limit = options[:limit]
                offset = options[:offset] || 0
                # The following trick was added by andrea+rails@webcom.it.
                sql.gsub!(/SELECT/i, 'SELECT B.* FROM (SELECT A.*, row_number() over () AS internal$rownum FROM (SELECT')
                sql << ") A ) B WHERE B.internal$rownum > #{offset} AND B.internal$rownum <= #{limit + offset}"
              end
            end