前端之家收集整理的这篇文章主要介绍了
关于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_precision is the number of digits in the fractional part of theSECOND datetime field. Accepted values offractional_seconds_precision are 0 to 9. The default is 6. The default format is determined explicitly by theNLS_TIMESTAMP_FORMAT parameter or implicitly by theNLS_TERRITORY parameter. 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,就是为了表示并存储纳秒。