--求分钟:
SELECT CEIL((TO_DATE('2016-07-19 10:10:10' , 'YYYY-MM-DD HH24-MI-SS') - TO_DATE('2016-07-19 10:07:50' , 'YYYY-MM-DD HH24-MI-SS')) * 24*60 ) as HOURS FROM DUAL;
--求小时:
SELECT CEIL((TO_DATE('2016-07-19 15:10:10' , 'YYYY-MM-DD HH24-MI-SS') - TO_DATE('2016-07-19 10:07:50' , 'YYYY-MM-DD HH24-MI-SS')) * 24 ) AS minutes FROM DUAL;
--求秒:
SELECT CEIL((TO_DATE('2016-07-19 10:10:10' , 'YYYY-MM-DD HH24-MI-SS') - TO_DATE('2016-07-19 10:07:50' , 'YYYY-MM-DD HH24-MI-SS')) * 24*60*60 ) as SECOND FROM DUAL;
望采纳