How do you subtract two columns in oracle database

How do you subtract two columns in oracle database, two columns are in data format.Example : inserttime column senttime column?

Showing Answers 1 - 8 of 8 Answers

nisha

  • Sep 25th, 2006
 

[sql statement 1

minus

sql statement 2]

  Was this answer useful?  Yes

rkh_301

  • Aug 12th, 2010
 

If the fields are defined as TIMESTAMP type, you could do something like below.  In this query, the startdttm and enddttm fields are defined as TIMESTAMP type:

select phasename, stepname, enddttm-startdttm as Elapsed from psupgstatus
where runname = 'dlm_v4d_b018';

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions