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: Date Types

Re: Date Types

From: spencer <spencerp_at_swbell.net>
Date: 2000/03/13
Message-ID: <Kggz4.3055$_3.45814@news.swbell.net>#1/1

a couple of choices:

  1. use trunc(date_value) to do the assignment
  2. add a check constraint to the column
  3. add an "after" trigger

with Oracle 8.1.6, i believe you could use the new "function" index to create a unique index on the expression " trunc(date_col) "

alter session set nls_date_format = 'DD-MM-YYYY HH24:MI:SS' select sysdate from dual ;
select trunc(sysdate) from dual;

"Markus Janscha" <markus_at_janscha.co.uk> wrote in message news:8ajk3m$8tl$1_at_gxsn.com...
> Hey All,
>
> I would like to set the input date as the primary key ae: each
 day only
> allows one entry .
> What data type do I use? I read in the Oracle manual that the
 date type also
> stores hours.
> I need to store the day (dd-mm-yyyy) only and make this
 unique. I should
> also still be able to do date arithmetic.
>
> Thanks
> Markus
>
>
>
>
Received on Mon Mar 13 2000 - 00:00:00 CST

Original text of this message

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