开发者

select top records later records [closed]

开发者 https://www.devze.com 2023-01-15 12:50 出处:网络
It's difficult to tell what is being as开发者_C百科ked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. Fo
It's difficult to tell what is being as开发者_C百科ked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

i want to select top 500 records later records (i.e from 501 records) to till another 100 records.


To select the first 500 records after recordId 6742:

select  top 500 *
from    YourTable
where   recordId > 6742
order by
        recordId


Depending on your engine you should check keywords LIMIT, OFFSET, ROWCOUNT and TOP.


For MySQL you could do SELECT * FROM table ORDER BY column LIMIT 500, 100. There isn't any generic solution for this so it would help to know what database you're working with.

0

精彩评论

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

关注公众号