Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between timestamp(0) and timestamp(6)

Can some body tell me the difference between timestamp(0) and timestamp(6) in Teradata

like image 751
user1172117 Avatar asked Feb 07 '12 20:02

user1172117


People also ask

What is a TIMESTAMP 6 in SQL?

A TIMESTAMP can store up to 9 digits of fractional seconds. You can also declare a TIMESTAMP WITH TIME ZONE or a TIMESTAMP WITH LOCAL TIME ZONE that stores a time zone as well so that you can convert times from one time zone to another.

What is the format of TIMESTAMP 6 in Oracle?

By default format of TIMESTAMP is 'YYYY-MM-DD HH24:MI:SS. FF'. By default format of TIMESTAMP WITH TIME ZONE is 'YYYY-MM-DD HH24: MI: SS. FF TZH: TZM'.


2 Answers

timestamp(p), where p is the number of digits in the fractional part of second (microseconds), 0 ⇐ p ⇐ 6. With 0 there are no fractions of the second.

  • TIMESTAMP documentation on official Teradata site
like image 163
Cheery Avatar answered Sep 23 '22 10:09

Cheery


The number (0 or 6) is the number of digits for fractions of a second that you want to store. 6 is the maximum.

  • TIMESTAMP documentation on official Teradata site
like image 28
Foggzie Avatar answered Sep 20 '22 10:09

Foggzie