Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Check Constraint for Current Date

311686Oct 27 2003 — edited Oct 27 2003
I am trying to create a table constraint to check a DATE column, called DATE1, to see if any of value entered in this column is greater than today's date. I tried the following two scripts and both gave the ORA-02436 error (ORA-02436: date or system variable wrongly specified in CHECK constraint):

alter table t1 add constraint ck_date1 check (date1 > current_date);

alter table t1 add constraint ck_date1 check (date1 > sysdate);

Any idea how to create this constraint
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2003
Added on Oct 27 2003
2 comments
905 views