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: Jonathan Tew <jtew_at_bpsinfo.com>
Date: Wed, 24 Feb 1999 23:45:51 -0500
Message-ID: <36D4D57F.A8CA03A3@bpsinfo.com>


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?

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
Received on Wed Feb 24 1999 - 22:45:51 CST

Original text of this message

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