All Forums Database
ppad001 18 posts Joined 06/11
06 Sep 2011
Timestamp Datatype

Hi All,

Can you please explain the concept for timestamp(0),timestamp(1) ....timestamp(6)..?

Thanks in advance for the help.

mnylin 118 posts Joined 12/09
06 Sep 2011

My understanding is the value in the (..) is basically the number of digits for fractions of a second that you want to store. So Timestamp(0) is accurate to the second, Timestamp(1) is accurate to a tenth of a second, etc. Timestamp(6) is the max.

ppad001 18 posts Joined 06/11
07 Sep 2011

Thanks for helping out.

skatepalli 1 post Joined 12/11
26 Dec 2011


Can you please explain how the timestamp value internally stores?  and how much space timestamp(0) will occupy?

I read below two statements in SQL doc.


1. Timestamp column takes 10 bytes space.

Date --> 4 bytes

Time -->  6 bytes

2. Timestamps represented as character strings must be syntactically precise and may take a maximum of twenty six bytes of storage.


Timestamp Format                                                      Character conversion

TIMESTAMP(0) ‘2001-12-07 11:37:58’                      CHAR(19)

TIMESTAMP(6) ‘2001-12-07 11:37:58.213000’        CHAR(26)


what is the difference between statement1 and statement2?

You must sign in to leave a comment.