Re: H2 database does not support OFFSET - LIMIT combination properly

1,223 views
Skip to first unread message

Thomas Mueller

unread,
Mar 1, 2013, 3:40:46 AM3/1/13
to H2 Google Group
Hi,

It's not a bug, it's just the way the grammar is defined.

Regards,
Thomas



On Thu, Feb 28, 2013 at 5:40 PM, Tomáš Repel <repel...@gmail.com> wrote:
Hi,
it seems to me that sql queries that end with OFFSET - LIMIT combination is not handled properly. For instance sql query `SELECT * FROM PET OFFSET 2 LIMIT 2` ends with failure, but the sql query `SELECT * FROM PET LIMIT 2 OFFSET 2` works with no problems.

I discovered this using h2console.war (http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/h2-console/) on JBoss AS 7.1.1.Final. The H2 version used: 1.3.168

Not sure whether I should submit a bug for this. Thanks for any comments.

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

trepel

unread,
Mar 1, 2013, 4:35:02 AM3/1/13
to h2-da...@googlegroups.com
Hi,
thanks for quick answer. I tried only HSQLDB (don't have time to try other
DB engines) and it can handle such queries. I have a maven project using
hibernate that generates such OFFSET - LIMIT sql queries for me, so I can't
use H2 database. Maybe you should consider to add this as feature request.
Hibernate version used: 4.1.6.Final.

With regards,
Tomas



--
View this message in context: http://h2-database.66688.n3.nabble.com/H2-database-does-not-support-OFFSET-LIMIT-combination-properly-tp4025876p4025888.html
Sent from the H2 Database mailing list archive at Nabble.com.
Reply all
Reply to author
Forward
0 new messages