Kelfink that was excellent :)
Do you know which databases support LIMIT/OFFSET feature in SQL. ?
What i am trying is to implement paging for a user on a report, the data for which comes from the database. Right not i am using postgres database, but in future we may use other databases.
Are there any severe performance implications to using this.
Main Topics
Browse All Topics





by: kelfinkPosted on 2002-06-03 at 11:51:08ID: 7051906
Sure.
SELECT * FROM mytable ORDER BY mytable.id
LIMIT 10 OFFSET 20;
The OFFSET is optional, and can be used to select a portion of the data set after the first row. THe example selects the 20th through 29th rows.