numtodsinterval(<x>,<c>) ,x是一個數字,c是一個字符串,
代表x的單位,這個函數把x轉爲interval day to second數據類型
經常使用的單位有 ('day','hour','minute','second')
example
SQL> select sysdate,sysdate+numtodsinterval(3,'hour') as res from dual;
SYSDATE RES ------------------- -------------------
2019-10-09 09:52:07 2019-10-09 06:52:07函數
numtoyminterval 與numtodsinterval函數相似,將x轉爲interval year to month數據類型
經常使用的單位有'year','month'
example
SQL> select sysdate,sysdate+numtoyminterval(3,'year') as res from dual;
SYSDATE RES ------------------- -------------------
2019-10-09 09:54:12 2022-10-09 09:54:12blog
-----------------------------------------------------------------------------------------------------------------------字符串