加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

关于Oracle数据库timestamp数据类型

发布时间:2020-12-12 14:06:27 所属栏目:百科 来源:网络整理
导读:关于Oracle数据库timestamp数据类型: https://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF0021 TIMESTAMP [( fractional_seconds_precision )] Year,month,and day values of date,as well as hour,minute,and second values of time,wh

TIMESTAMP[(fractional_seconds_precision)]

Year,month,and day values of date,as well as hour,minute,and second values of time,wherefractional_seconds_precisionis the number of digits in the fractional part of theSECONDdatetime field. Accepted values offractional_seconds_precisionare 0 to 9. The default is 6. The default format is determined explicitly by theNLS_TIMESTAMP_FORMATparameter or implicitly by theNLS_TERRITORYparameter. The size is 7 or 11 bytes,depending on the precision. This data type contains the datetime fieldsYEAR,MONTH,238);">DAY,238);">HOUR,238);">MINUTE,andSECOND. It contains fractional seconds but does not have a time zone.

fractional_seconds_precision是秒的小数部分的精度位数,这个精度位数从0到9,默认是6

大家知道,比秒更小的单位有毫秒(ms),微(us),纳秒(ns)

1秒=1000毫秒(ms)

1毫秒=1000微(us)

1微秒=1000纳秒(ns)

我推测timestamp数据类型秒的小数部分的精度位数最精确到9,就是为了表示并存储纳秒。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

关于Oracle数据库timestamp数据类型:

https://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF0021

    推荐文章
      热点阅读