select with start, stop and rowcount, need total select with start, stop and rowcount, need total oracle oracle

select with start, stop and rowcount, need total


You can add count(*) over() to outerfields derived table:

select outerfields.*   from   (    select row_number() over (order by id asc) r,            count(*) over () totalRows,           innerfields.*       from       (        select *           from table      ) innerfields  ) outerfields where r between 1 and 10;