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

Home -> Community -> Usenet -> c.d.o.server -> Re: Using SYSDATE as part of Primary Key?

Re: Using SYSDATE as part of Primary Key?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 25 Feb 1999 13:15:40 GMT
Message-ID: <36df4cc9.22591755@192.86.155.100>

(if that email address didn't require changing) On Wed, 24 Feb 1999 23:45:51 -0500, you wrote:

>Well I'm not sure of the granularity of the Oracle 8 DATE datatype, but
>this is key to the argument. Is it even theoretically possible for the
>system to query the date twice within an interval that the DATE datatype
>doesn't measure down to. Of course the answer might currently be no on
>todays hardware, but will this be true on machines a couple of years
>from now?
>

with daylight savings time -- it is always possible. Once a year, 1am-2am happens twice. if you are running then -- all of the timestamps may overlap :)

>Just my two cents,
>Jonathan Tew
>
>Douglas Scott wrote:
>>
>> A couple of analysts were having a discussion the other day with respect
>> to using SYSDATE as part of the primary key (actually a column in the
>> table would be defined as ENTERED_DATE with a default value of
>> SYSDATE). The discussion centered around the possibilty of 2 users
>> entering the same data at the same time and thusly one of them getting
>> an error about a duplicate record. I would think that entering 2
>> records with the same key (if SYSDATE was part of the key) at the same
>> time would be almost impossible to do, but does anyone else know if
>> Oracle's SYSDATE would have problems doing this?
>>
>> Douglas Scott
>> Douglas.S.Scott_at_USAHQ.unitedspacealliance.com
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Feb 25 1999 - 07:15:40 CST

Original text of this message

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