Hi All,

I was doing some reading about the general problem of how to 
implement database paging in JDBC, and since paging is not part of 
the SQL ANSI standard, JDBC doesn't apparently have a native (API) 
method of supporting it.

One of the suggestions is to manually add a "datarow" column, which 
is auto-incremented by 1 in every row. Then paging queries can be 
spoofed via the SQL's WHERE clause.

This assumes that rows are never deleted, which is most of my cases 
is a reasonable one.

Opinions?

Otherwise, I'll have to introduce a runtime-specified paging helper 
class that returns valid SQL for the DB being used (MySQL and 
PostgreSQL have a completely different, and incompatible, paging 
syntax, if memory serves).

Regards,
Kevin


Reply via email to