←back to thread

189 points GordonS | 1 comments | | HN request time: 0.208s | source
Show context
cpeterso ◴[] No.19532799[source]
What timestamp types are available in MySQL, SQL Server, and Oracle?
replies(5): >>19532853 #>>19532902 #>>19533224 #>>19533575 #>>19533819 #
1. niftich ◴[] No.19533819[source]
Oracle has 'DATE', 'TIMESTAMP', 'TIMESTAMP WITH TIME ZONE', and 'TIMESTAMP WITH LOCAL TIME ZONE'.

Out of these, 'TIMESTAMP' and 'TIMESTAMP WITH TIME ZONE' do exactly what you'd expect without needing a big tutorial.

'DATE' is a 'TIMESTAMP' that can't store fractional seconds.

And 'TIMESTAMP WITH LOCAL TIMEZONE' is an unmitigated footgun that you'll probably misuse.