问题
I need something like
select * from tableName where date_column > now()
However, now() doesn't work in H2. Please advise.
回答1:
use CURRENT_TIMESTAMP
select * from tableName where date_column > CURRENT_TIMESTAMP()
- CURRENT_TIMESTAMP
回答2:
IF you want to compare with present date only then use
select * from tableName where date_column > CURRENT_DATE()
IF you want to compare with present date and time also
select * from tableName where date_column > CURRENT_TIMESTAMP
来源:https://stackoverflow.com/questions/59255430/use-sysdate-in-formula-in-oracle-and-h2