文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 高等教育 > 管理学 > Oracle Date and Time
侵权投诉

Oracle Date and Time

数据库 课件

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

第1页

你可能喜欢

热门文档

相关文档

  • 怎样解决oracle报错is not a valid date and time

    怎样解决oracle报错is not a valid date and time_计算机软件及应用_IT/计算机_专业资料。怎样解决 oracle 报错 is not a valid date and time 在 win8.1...

  • SAS Date and Time Functions

    Oracle Date and Time 3页 1下载券 喜欢此文档的还喜欢 sas软件教程 118页...C h a p t e r 4 Date and Time Functions Introduction 180 Functions ...

  • Time and Date

    Oracle Date and Time 3页 1下载券 SAS Date and Time Func... 40页 ...Unit 5 Time and Date Months 一月:January ['d??nj?(?)r?] 二月:...

  • oracle日期函数处理及示例

    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....

  • Flowering Time Genes Heading date 1 and Early headi...

    date and time 暂无评价 13页 免费 94 Time and Date 时间和日... 2页 免费 Oracle Date and Time 3页 2财富值 Time,date and address 暂无评价 5页 ...

  • Oracle9i-SQL-11 语言 大全Datetime Functions

    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 的日期和时间详解 Oracle 提供了三个用于存储日期/时间值的数据类型: ...从 Oracle9i 开始提供的 TIMESTAMP 类型是 DATE 类型的有效扩展格式,并且符合 ...

  • Oracle的to_date函数

    Oracle的to_date函数_IT/计算机_专业资料。to_date函数Oracle 的 to_date ...SQL> select sessiontimezone,current_timestamp from dual; SESSIONTIMEZONE CURRENT...

  • oracle常用函数汇总

    Date Functions (dt represents oracle date and time) * * (functions return an oracle date unless otherwise specified) * *** ADD_MONTHS(dt, num) -- ...

  • Oracle TO_DATE 日期格式大全

    Oracle TO_DATE 日期格式大全_IT认证_资格考试/认证_教育专区。简要介绍资料的...Likewise, you can extract TIMEZONE_HOUR and TIMEZONE_MINUTE only from the...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email