469,159 Members | 1,382 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,159 developers. It's quick & easy.

Check constraint

How to find the condition that dob is lessthan currdate in check constraint?
Sep 5 '06 #1
2 1546
vssp
268 100+
I hope this link hellp for u

http://www.psoug.org/reference/date_func.html


thanks
VssP
Sep 5 '06 #2
Hi,

Use the trigger.

CREATE OR REPLACE TRIGGER trg_emp_dob BEFORE INSERT OR UPDATE ON emp
BEGIN
IF :new.dob > SYSDATE THEN
RAISE_APPLICATION_ERROR (num => -20000, msg => 'DOB Cannot be in the future');
END IF;
END;


Thanks,

Mohan Reddy G
Sep 13 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Edmund Dengler | last post: by
1 post views Thread by huyuhui | last post: by
3 posts views Thread by Helen Wheels | last post: by
2 posts views Thread by joerg.sailer | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.