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.
我有一个关于 derby 数据库的 sql 问题:
Select a.name, a.starttime, a.endtime From a
如何添加到上面的 sql 语句,以便我可以获得开始时间和结束时间之间的小时差?(我只知道mysql有一个DATEDIFF函数,但我不确定derby db应该使用什么函数)
谢谢。
在德比中有一个 TIMESTAMPDIFF:
例如:
select {fn timestampdiff(SQL_TSI_FRAC_SECOND, startdate, enddate)} as diff