Reputation: 331
Say I have 50 records in my table,(unique id is auto increment from 1 to 50) how do I retrieve records 10 to 30 using a sql query
Upvotes: 1
Views: 474
Reputation: 12940
SELECT columnlist
FROM yourTable
WHERE IDColumn BETWEEN 10 AND 30
Upvotes: 1
Reputation:
select *
from yourTable
where yourIdColumn between 10 and 30
Replace yourTable
with your table's name, and yourIdColumn
with the name of your unique id field.
Upvotes: 1