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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

limiting rows returned based on count

Status
Not open for further replies.

keak

Programmer
Sep 12, 2005
247
CA
Hi there,
say if I have 3000 records in my db,
and I want to get rows 200~300 when orderd by a specific field in this table, is there a easy way to do it?

I have something like
select * from table_name order by ID desc limit ....

but I am not sure if this syntax allows me to do what I am trying to do .
 
You could use:[tt]
LIMIT 199,100[/tt]
which will skip the first 199 records and return the next 100.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top