关于Oracle数据库timestamp数据类型

关于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, where fractional_seconds_precision is the number of digits in the fractional part of the SECOND datetime field. Accepted values of fractional_seconds_precision are 0 to 9. The default is 6. The default format is determined explicitly by theNLS_TIMESTAMP_FORMAT parameter or implicitly by the NLS_TERRITORY parameter. The size is 7 or 11 bytes, depending on the precision. This data type contains the datetime fields YEARMONTHDAYHOUR,MINUTE, and SECOND. 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,就是为了表示并存储纳秒。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值