Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Unique Key enforcement on a DATE Column for DAY (mm/dd/yy)
You could put a "before insert" trigger on the table and trunc the date
column to strip the time value out of it. This would allow the unique
constraint to prevent the insert from happening.
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of BN
Sent: Tuesday, October 23, 2007 10:45 AM
To: oracle_L_list
Subject: Unique Key enforcement on a DATE Column for DAY (mm/dd/yy)
Greetings
I have a requirement to enforce Uniqueuness on a DATE Column for a day only (mm/dd/yy(yy)
Should allow users to enter data only once in a day, Can it be enforced through a Unique constraint
Need to implement this in Oralce 8i, 9i, 10g
-- Regards & Thanks BN -- http://www.freelists.org/webpage/oracle-lReceived on Tue Oct 23 2007 - 10:22:38 CDT
![]() |
![]() |