For H2 (and for any other DBMS that supports standard INTERVAL data type) you need to use
SELECT * FROM GY.TABLE_NAME WHERE TEST_ID < 999999999
AND CURRENT_TIMESTAMP > TEST_GMTS + INTERVAL '20' HOUR;
Unfortunately, it looks like this standard-compliant syntax isn't supported by DB2.
20 HOURS
is DB2-specific.
It means you need to use different SQL for different databases.
The next version of H2 (2.0.*) will also support more exotic syntax
SELECT * FROM GY.TABLE_NAME WHERE TEST_ID < 999999999
AND CURRENT_TIMESTAMP > TEST_GMTS + 20 HOUR;
(with HOUR
only, HOURS
are invalid). This syntax is accepted by DB2 too, so hypothetically you can compile H2 from its current sources and use this own build instead of released version if you really need to use the same SQL for both H2 and DB2, but current H2 is very different from 1.4.* and you may run into some other issue.