How to use current date in H2 database SQL query

Pavel Vyazankin picture Pavel Vyazankin · Feb 8, 2013 · Viewed 40.5k times · Source

I need something like

select * from tableName where date_column > now()

However, now() doesn't work in H2. Please advise.

Answer

John Woo picture John Woo · Feb 8, 2013

use CURRENT_TIMESTAMP

select * from tableName where date_column > CURRENT_TIMESTAMP()