首页 > 数据库技术 > 详细

oracle函数

时间:2019-10-23 15:08:48      阅读:69      评论:0      收藏:0      [点我收藏+]

1.EXTRACT函数

技术分享图片

 

 If YEAR or MONTH is requested, then expr must evaluate to an expression of data
type DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH LOCAL TIME
ZONE, or INTERVAL YEAR TO MONTH.
If DAY is requested, then expr must evaluate to an expression of data type DATE,
TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH LOCAL TIME ZONE, or
INTERVAL DAY TO SECOND.
If HOUR, MINUTE, or SECOND is requested, then expr must evaluate to an expression
of data type TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH LOCAL TIME
ZONE, or INTERVAL DAY TO SECOND. DATE is not valid here, because Oracle Database
treats it as ANSI DATE data type, which has no time fields.
If TIMEZONE_HOUR, TIMEZONE_MINUTE, TIMEZONE_ABBR, TIMEZONE_REGION, or
TIMEZONE_OFFSET is requested, then expr must evaluate to an expression of data
type TIMESTAMP WITH TIME ZONE or TIMESTAMP WITH LOCAL TIME ZONE

返回类型:

When you specify TIMEZONE_REGION or TIMEZONE_ABBR (abbreviation), the value
returned is a VARCHAR2 string containing the appropriate time zone region name or
abbreviation. When you specify any of the other datetime fields, the value returned is
an integer value of NUMBER data type representing the datetime value in the Gregorian
calendar.

oracle函数

原文:https://www.cnblogs.com/studyking/p/11726242.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!