Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kpgraci
Yak Posting Veteran
68 Posts |
Posted - 2010-09-23 : 09:54:30
|
| Hi all,I want to page through a large number of records so I display only, say, 20 at a time.I can get the first 20 with SELECT TOP 20 F1, F2 FROM TABLE ORDER BY F1But how can I get the next (and previous) set of records?For example, I may want records 60-80 as ordered by field F1.Worst case I can query the TOP 80 in this case and only return the last 20 (since this is being called via a web service I'm writing) but that would not be very efficient for records 10,000 to 10,020.Thanks!kpg |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
|
|
|
|
|