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: Hair-Puller - Date constraint

Re: Hair-Puller - Date constraint

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Fri, 27 Jan 2006 03:28:32 GMT
Message-Id: <pan.2006.01.27.03.28.31.547658@sbcglobal.net>


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.com
Received on Thu Jan 26 2006 - 21:28:32 CST

Original text of this message

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