关于Oracle数据库timestamp数据类型

前端之家收集整理的这篇文章主要介绍了关于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,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,就是为了表示并存储纳秒。

原文链接:https://www.f2er.com/oracle/206514.html

猜你在找的Oracle相关文章