java - Is there a portable way to have "SELECT FIRST 10 * FROM T" semantic? -
I want to read data from the block of 10k records from a database.
I found it on Wikipedia and it is clear that it can not be done with SQL in a portable manner.
There may be another method which provides several ways to ask questions, but how can I decide that enough rows have been read, did not indicate this through callmax such as Rome Mapper and ResultSetExtractor Can be gone, that enough data has been read.
Edit: I was looking for a solution for the JDBC templates, it suggests using it which I ignored. Hold
Will handle
Being hibernate can pignet you using and eg
You can do the same in JPA and.
list users = em.createQuery ("Choose and select from user u order from UUID"); .setFirstResult (0) // Index of first line to be retrieved. .setMaxResults (10) // The amount of rows to be received. .getResultList ();
Comments
Post a Comment