• This is good. But i wanted to ask, what about the situation in which, say there are only 5 records in the table, and you ask for page number 2 with page size 10?

    In that case there is no data returned to you, and you will not get to know how many records are there, in the table.