Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Date in primary key
Sybrand Bakker wrote:
>
> <eoin7_at_my-deja.com> wrote in message news:8p386u$tap$1_at_nnrp1.deja.com...
> >
> >
> > Is it okay to have a date column as part of a primary key, or should
> > this be avoided?
> > My db design includes an associative table that seems to require a date
> > column for uniqueness, along with the keys from the tables being
> > associated.
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> Shouldn't be a problem, provided you take care to trunc the date upon insert
> or update if the time doesn't interest you. Otherwise you will have to
> include an explicit range scan for the last day (which I usually do by
> appending 23:59:59).
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
and at the other extreme, making you don't get two rows within a second
HTH
-- =========================================== Connor McDonald http://www.oracledba.co.uk We are born naked, wet and hungry...then things get worseReceived on Tue Sep 05 2000 - 07:08:24 CDT
![]() |
![]() |