Closed
Description
H2 officially supports only OFFSET / FETCH from the SQL Standard:
https://h2database.com/html/commands.html#select
H2 accepts it unconditionally (even in compatibility modes for database systems without its support).
But H2Dialect
produces non-standard LIMIT
/ OFFSET
for a some reason:
H2 accepts this legacy syntax only in Regular, Legacy, DB2, HSQLDB, MariaDB, MySQL, and PostgreSQL compatibility modes.
https://h2database.com/html/features.html#compatibility
It isn't accepted in Strict, Derby, MSSQLServer, and Oracle compatibility modes and it causes syntax errors like that one:
https://stackoverflow.com/questions/72880912/spring-boot-2-7-1-with-data-r2dbc-findbyid-fails-when-using-h2-with-mssqlserve