5. SQL 92
5.1. SQL 92 Primer
Table of Contents
SQL 92 has an elaborate time concept which includes the following datatypes:
TIME WITH TIME ZONE
TIMESTAMP WITH TIME ZONE
DATEholds year, month and day, i.e. NO time components.
TIMEholds hour, minute, and second.
TIMESTAMPholds year, month, day, hour, minute, and second.
TIMESTAMPliteral is inserted into a database, the server's time zone is added to the literal. Example: If the server is running in Denmark and it is August, the server's time zone is GMT+02:00. If
TIMESTAMP '1999-08-02 11:49:00'is inserted, the literal is thus adjusted with
+02:00. If, however,
TIMESTAMP '1999-01-02 11:49:00'is inserted, the literal is adjusted with
+01:00(because there is no daylight savings in January).
If you want to be in full control over the time zones, you should use the
TIMESTAMP WITH TIME ZONEdatatype. Example:
TIMESTAMP '1999-08-02 11:49:00-08:00'.
The same comments apply to
TIME WITH TIME ZONE.
If you have feedback or questions on this document, please send e-mail to email@example.com. Please reference the section number and topic. Thanks!!
©2000 FrontBase, Inc. All rights reserved.