Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Hair-Puller - Date constraint
On Thu, 26 Jan 2006 09:38:29 -0800, Anurag Varma wrote:
> ORA92> create table t1 (a number, b date, c date default sysdate);
> Table created.
>
> ORA92> alter table t1 add constraint t1_dob_cons check (b >
> to_date('01-01-1900','mm-dd-yyyy') and b < c);
Sneaky! It involves a column just to hold the system date. I love your solution.
-- http://www.mgogala.comReceived on Thu Jan 26 2006 - 21:28:32 CST