Oracle timestamp data type

前端 未结 2 1003
自闭症患者
自闭症患者 2021-01-31 14:00

what is the different between timestamp data type without parameter and with parameter 0:

timestamp VS timestamp(0)

2条回答
  •  鱼传尺愫
    2021-01-31 14:50

    The number in parentheses specifies the precision of fractional seconds to be stored. So, (0) would mean don't store any fraction of a second, and use only whole seconds. The default value if unspecified is 6 digits after the decimal separator.

    So an unspecified value would store a date like:

    TIMESTAMP 24-JAN-2012 08.00.05.993847 AM
    

    And specifying (0) stores only:

    TIMESTAMP(0) 24-JAN-2012 08.00.05 AM
    

    See Oracle documentation on data types.

提交回复
热议问题