From: Chris W. <ch...@cw...> - 2003-01-06 03:26:14
|
This is a simple SQL question, but I figured there are enough folks on here who work with different database platforms to know: what's the most common datatype to hold a date and time value? I've been using 'datetime', but that seems to have gone away in the newest PostgreSQL release, being replaced by 'timestamp' The type 'timestamp' is referenced as a SQL-92 datatype [1], but a MySQL page [2] uses 'timestamp' as a date plus time that is automatically set to the time of the last insert/update. FirebirdSQL/InterBase also seem to use 'timestamp' as a datetime column type. So my question is: is there any consistent column type for this, or do I need to make this vary among database vendors as well? Thanks, Chris [1] http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=x2632%2ehtm [2] http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#DATETIME [3] http://www.firebirdsql.org/index.php?op=faq -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |