Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 TIMESTAMP 类型的列上的 H2 数据库中,如何运行查询
SELECT * FROM RECORDS WHERE TRAN_DATE < '2012/07/24'
尝试'2012-07-24'
'2012-07-24'
http://www.h2database.com/html/grammar.html?highlight=dateType&search=date#date
对我来说,以下内容有所帮助,因为我还需要将完整的时间戳与日期和时间进行比较:
SELECT * FROM RECORDS WHERE TRAN_DATE < TIMESTAMP '2020-07-24 20:00:00'
即使对提问者没有帮助,这也可能对其他人有所帮助。