数据库 课件
Resources
by Hector Garcia, Jeff Ullman, and
Jennifer Widom.
by Jeff Ullman and Jennifer Widom. Gradiance . Oracle Dates and Times
Overview
Oracle supports both date and time, albeit differently from the SQL2 standard. Rather than using two separate entities, date and time, Oracle only uses one, DATE. The DATE type is stored in a special internal format that includes not just the month, day, and year, but also the hour, minute, and second.
The DATE type is used in the same way as other built-in types such as INT. For example, the following SQL statement creates a relation with an attribute of type DATE: create table x(a int, b date);
DATE Format
When a DATE value is displayed, Oracle must first convert that value from the special internal format to a printable string. The conversion is done by a function TO_CHAR, according to a DATE format. Oracle's default format for DATE is "DD-MON-YY". Therefore, when you issue the query
select b from x;
you will see something like:
B
---------
01-APR-98
Whenever a DATE value is displayed, Oracle will call TO_CHAR automatically with the default DATE format. However, you may override the default behavior by calling TO_CHAR explicitly with your own DATE format. For example,
SELECT TO_CHAR(b, 'YYYY/MM/DD') AS b
怎样解决oracle报错is not a valid date and time_计算机软件及应用_IT/计算机_专业资料。怎样解决 oracle 报错 is not a valid date and time 在 win8.1...
Oracle Date and Time 3页 1下载券 喜欢此文档的还喜欢 sas软件教程 118页...C h a p t e r 4 Date and Time Functions Introduction 180 Functions ...
Oracle Date and Time 3页 1下载券 SAS Date and Time Func... 40页 ...Unit 5 Time and Date Months 一月:January ['d??nj?(?)r?] 二月:...
Otherwise Oracle calculates the fractional portion of the result based on a 31-day month and considers the difference in time components date1 and date2....
date and time 暂无评价 13页 免费 94 Time and Date 时间和日... 2页 免费 Oracle Date and Time 3页 2财富值 Time,date and address 暂无评价 5页 ...
Oracle Corporation, 2001. All rights reserved. Oracle9i Datetime Support ? ? In Oracle9i, you can include the time zone in your date and time data, ...
Oracle 的日期和时间详解 Oracle 提供了三个用于存储日期/时间值的数据类型: ...从 Oracle9i 开始提供的 TIMESTAMP 类型是 DATE 类型的有效扩展格式,并且符合 ...
Oracle的to_date函数_IT/计算机_专业资料。to_date函数Oracle 的 to_date ...SQL> select sessiontimezone,current_timestamp from dual; SESSIONTIMEZONE CURRENT...
Date Functions (dt represents oracle date and time) * * (functions return an oracle date unless otherwise specified) * *** ADD_MONTHS(dt, num) -- ...
Oracle TO_DATE 日期格式大全_IT认证_资格考试/认证_教育专区。简要介绍资料的...Likewise, you can extract TIMEZONE_HOUR and TIMEZONE_MINUTE only from the...
热门文档