why don't we have a maxRows attribute? JDBC supports it and its handy
every once in a while. Especially when your application has to work
with different databases and every dialect uses a different approach
to limit the result set.
SELECT TOP 10 column FROM table // SQL Server
SELECT column FROM table LIMIT 10 // MySQL
SELECT column FROM table WHERE ROWNUM <= 10 // Oracle
SELECT column FROM table FETCH FIRST 10 ROWS ONLY // DB2
<select id="selectValues" maxRows="10">
SELECT column FROM table
I opened ticket 65 for this one and included a patch in case someone
might find this useful. Btw. how can I change defect to feature?