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
-----------------------------------------------------------------------------------------------------------------------字符串