问题
How can we add two dates in oracle? For example in sql we can do this, " date_1 + date_2 " how can we achieve the same thing in Oracle
回答1:
Adding two dates together would be meaningless but you can add an interval to a timestamp. For example, to add 1 year and 10 months to a timestamp:
SELECT SYSDATE + INTERVAL '1-10' YEAR TO MONTH FROM DUAL;
You can also add days to a DATE
column using simple arithmetics. For example, you can add 45 days to the current date using:
SELECT CURRENT_DATE + 45 FROM DUAL;
来源:https://stackoverflow.com/questions/12954947/how-to-add-2-dates-in-oracle-sp