Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return ordinal groups of rows? 1

Status
Not open for further replies.

msgregory

Programmer
Joined
Aug 1, 2001
Messages
2
Location
US
Is there a way to get the first 10 rows, the second 10, etc. of a query, like search engine results?
 
try
select top 10... John Fill
1c.bmp


ivfmd@mail.md
 
How do I get the second 10, I should say?
 
SELECT * FROM tablename LIMIT 10;

SELECT * FROM tablename LIMIT 10,10;

SELECT * FROM tablename LIMIT 20,10;

SELECT * FROM tablename LIMIT 30,10;

etc...

When you have two arguments to LIMIT, the first number is the row offset, and the second one is the number of rows to show.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top