Is there a portable way to have “SELECT FIRST 10 * FROM T” semantic?

前端 未结 5 1348
死守一世寂寞
死守一世寂寞 2020-12-10 03:56

I want to read data in blocks of say 10k records from a database.

I found Result limits on wikipedia and it seems obvious that this can\'t done with sql in a portabl

5条回答
  •  死守一世寂寞
    2020-12-10 04:37

    There is no portable way of doing that on plain SQL, because different SQL Engines use different syntaxes for that.

    Use a Database Abstraction Layer, or DBAL.

    http://en.wikipedia.org/wiki/Database_abstraction_layer

    http://jonasbandi.net/wiki/index.php/ORM_Solutions_for_Java

提交回复
热议问题