您的位置:首页 > 其它

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

. . .
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  yminterval