开发者

How to select n number of rows in ms access

Here is a table patients in MS开发者_如何学编程 access database, There is 20 records, I want to select first 0 10 records and after 11-20 records for pagination. How to solve this problem


If it's ok to order your output by primary key you could do something like this:

Select top 10 *
from patients
where patientid > @id

You would need to keep track of the last id shown on the page, sending that to the query every time. This won't work if you sort by something other than the id

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜