Can you help me write SQL sentence that choose many rows ? It is about pagination - parameters are size of page (=number of rows in one bucket) and number of page to choose (many rows = size of page).
For me, it should look like:
cnt =select count(*) from table
select * from table limit x,y
x=cnt/size_of_page * number_of_page
y=(cnt/size_of_page * number_of_page)+size_of_page
I am not sure if I am correct. Can you help me with translating it into sql server ?