Paging queries consume lot’s of resources and are not scalable very well, should be avoided.
Oracle
1 2 3 4
SELECT ID, JSON FROM ( SELECT ROWNUM RN, ID, JSON FROM MY_BASS ORDERBY ID ASC ) AS T WHERE RN BETWEEN ((@PageNumber-1) *@RowspPage+1) AND (@PageNumber*@RowspPage);