> Actually I want to figure out the total in a column of the select before > limiting the result. > In Oracle I would do it probably by selecting the data within an inner > select and a field with the window function "COUNT(*) OVER()" which is also > provided by Jooq and works for me on Oracle, SQL Server. Unfortunately MySql > does not support this functionality and you have to do it with the nice but > different "FOUND_ROWS()" function.
Yes, I'm afraid there is no simple way to implement this uniformly with MySQL lacking window function support. > H2 not support it yet, but might upcoming with the 1.4.X verison. > As you probably know because I saw that you requested some window function > for H2 in the H2 community :). True, I have been frequently trying to raise interest in this SQL standard feature in open source communities. I can recognise a couple of my own feature requests on the H2 roadmap: http://www.h2database.com/html/roadmap.html Feel free to suggest adding window function support once more on the H2 user group. CUBRID, another fine open source database has recently released version 9.0 with partial window function support: http://www.cubrid.org/blog/news/announcing-cubrid-9-0-with-3x-performance-increase-and-sharding-support/ Cheers Lukas
