Currently I have a frontend JQuery datatable (which is set to serverside), and my stored procedure (SP) is returning all of the data as below:
Select ID, FullName, FullAddress, Coord
From Names n
inner join Person p ON n.ID = p.PID
inner join Address a ON n.AddressID = a.ID
order by FullName
I want to achieve paging and restrict to only 200 rows of data at a time. I can pass in the page no (page no begins from 0) as parameter to SP i.e. for example if the pageno = 0 the first 200 rows should only be returned. if page no = 1 rows from position 200 to 400 will be returned and so on.
How can I change the above SP to achieve this ?