to_yminterval
2013-10-20 11:54
337 查看
Syntax
to_yminterval::=
Description of the illustration to_yminterval.gif
Purpose
TO_YMINTERVAL converts a character string of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to an INTERVAL YEAR TO MONTH type, where char is the character string to be converted.
Examples
The following example calculates for each employee in the sample hr.employees table a date one year two months after the hire date:
SELECT hire_date, hire_date + TO_YMINTERVAL('01-02') "14 months"
FROM employees;
HIRE_DATE 14 months
--------- ---------
17-JUN-87 17-AUG-88
21-SEP-89 21-NOV-90
13-JAN-93 13-MAR-94
03-JAN-90 03-MAR-91
21-MAY-91 21-JUL-92
. . .
to_yminterval::=
Description of the illustration to_yminterval.gif
Purpose
TO_YMINTERVAL converts a character string of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to an INTERVAL YEAR TO MONTH type, where char is the character string to be converted.
Examples
The following example calculates for each employee in the sample hr.employees table a date one year two months after the hire date:
SELECT hire_date, hire_date + TO_YMINTERVAL('01-02') "14 months"
FROM employees;
HIRE_DATE 14 months
--------- ---------
17-JUN-87 17-AUG-88
21-SEP-89 21-NOV-90
13-JAN-93 13-MAR-94
03-JAN-90 03-MAR-91
21-MAY-91 21-JUL-92
. . .
相关文章推荐
- 谷歌三大核心技术(二)Google MapReduce中文版
- 谷歌三大核心技术(一)The Google File System中文版
- C++之const
- Linux删除指定后缀名的文件
- eclipse web工程导入到Tomcat
- core data 使用的简单例子
- [智力题] 用信息熵解决天平跟毒药问题
- 网站架构方案全解析
- OpenCart之联系我们contact us页面提交时邮件错误
- POJ 1330 LCA入门题(Tarjan)
- Domino下通过代理公式批量修改用户属性值---勾选强制用户在下次登陆时更改Internet
- 创业杂谈
- 面试体验:Microsoft 篇
- 《算法导论》第十章----基本数据结构
- asp.net中ashx文件如何调用session
- 39-3
- 同步+异步上传文件
- 移植OpenCV的AdaBoost人脸检测算法到DM6467
- 在窗体中添加标签Label、Icon图标
- 整合hibernate,JBPM.4.4的Spring配置文件