Time difference between two date columns

Solution 1 SQL> CREATE TABLE dates (date1 DATE, date2 DATE); Table created. SQL> SQL> INSERT INTO dates VALUES (SYSDATE, SYSDATE-1); 1 row created. SQL> INSERT INTO dates VALUES (SYSDATE, SYSDATE-1/24); 1 row created. SQL> INSERT INTO dates VALUES (SYSDATE, SYSDATE-1/60/24); 1 row created. SQL> SELECT (date1 – date2) FROM dates;… read more →