Re: Is there a column-data-type restricted to truncated date format?

From: Ed Prochak <edprochak_at_gmail.com>
Date: Mon, 12 Apr 2010 06:31:35 -0700 (PDT)
Message-ID: <826f3398-a2cf-4b8b-ac40-3877d52087b8_at_k33g2000yqc.googlegroups.com>



On Apr 12, 6:22 am, Norbert Winkler <norbert.winkl..._at_gmx.de> wrote:
> Hi,
>
> for creating a unique index with a date-column A_DATE I'm using a
> calculated column X_DATE as (trunc(A_DATE)):
>
> CREATE UNIQUE INDEX UX_A_TABLE
>   ON A_TABLE (
>     ...,
>     X_DATE
>   )
> /
>
> Using A_DATE in UX_A_TABLE would fail if someone would use sysdate two
> times a day.
> Is there a column-data-type restricted to truncated date format?

There is DATE and TIMESTAMP data types. Oracle has always had the combined date/time type. There is no truncated date type. What's stopping you from using a check constraint?

  Ed Received on Mon Apr 12 2010 - 08:31:35 CDT

Original text of this message