Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: TimeStamp DataType??

Re: TimeStamp DataType??

From: Robert William Vesterman <bob.work_at_vesterman.com>
Date: 2000/07/19
Message-ID: <39760fad.22600859@News.CIS.DFN.DE>#1/1

On Wed, 19 Jul 2000 21:18:44 +0100, "Jim Harrison" <jim_at_colway.net> wrote:

>DATE IS a time stamp column. To prove this to yourself try something like
>this:
>SELECT TO_CHAR(date_col, 'DD/MM/YYYY HH24:MI:SS') FROM your_tab;

There seems to be some confusion between the original poster and the respondants. The confusion here lies in the fact that the Transact-SQL "timestamp" type has nothing to do with dates or times.

What it is is a column which is automatically set by the server whenever an insert or update is done on the table it's in; its value is a monotonically increasing number, eight bytes in length.

So, you can use it to determine the order that rows were modified (well, at least until quintillions of inserts/updates have been done on that table). Oracle's "date" type doesn't handle this, since its resolution is only down to the second. Moreover, Oracle's "date" is not an automatic thing - you have to specify it in the insert/update (or in a trigger, or whatever).

So, is there anything in Oracle similar to timestamp?

Bob Vesterman. Received on Wed Jul 19 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US