with t as (
select '00:02:55' some_time from dual union all
select '01:44:01' from dual
)
select numtodsinterval(sum(to_char(to_date(some_time,'hh24:mi:ss'),'sssss')),'second') total_time
from t
结果:
总时间
+000000000 01:46:56.000000000
UPD:如果您需要较低的精度,您可以转换:
with t as (
select '00:02:55' some_time from dual union all
select '01:44:01' from dual
)
select cast(numtodsinterval(sum(to_char(to_date(some_time,'hh24:mi:ss'),'sssss')),'second') as interval day(2) to second(0)) total_time
from t
结果:
UPD:如果您需要较低的精度,您可以转换:
结果: