📜  时间戳之间的 oracle 持续时间 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:30.779000             🧑  作者: Mango

代码示例1
-- Duration between 2 timestamps
SELECT (extract(DAY FROM TIME2 - TIME1) * 24 * 60 * 60) 
           + (extract(HOUR FROM TIME2 - TIME1) * 60 * 60) 
           + (extract(MINUTE FROM TIME2 - TIME1) * 60) 
           + extract(SECOND FROM TIME2 - TIME1)
FROM DUAL;