Asked: March 25, 2003 - am UTC Answered by: Tom Kyte - Last updated: October 10, 2012 - pm UTC Category: Database - Version: 9.0.2 Viewed 100K times!This question is alter table t enable novalidate constraint uniq_a; alter table t enable novalidate constraint uniq_a * ERROR at line 1: ORA-02299: cannot validate (TUSKERDEV.Is there some way to enforce NOT NULL only on future data but not on existing data? Quick question, what is the reason for your "caveat emptor" in the earlier followup?Having some data obey the constraint and some data not obey it is the whole point of ENABLE NOVALIDATE, right?This allows existing rows to violate the constraint, while ensuring that all new or modified rows are valid.In an ALTER TABLE statement, ENABLE NOVALIDATE resumes constraint checking on disabled constraints without first validating all data in the table. The constraint is not checked and is not necessarily true.
It’s now possible to define the min-/max value for a field/column.
Or, you can create the constraint as normal, lose the index (which may be equally as desirable as keeping it depending on your circumstances of course) and create a NON-Unique index manually: [email protected] alter table t enable novalidate constraint uniq_a; alter table t enable novalidate constraint uniq_a * ERROR at line 1: ORA-02299: cannot validate (OPS$TKYTE.
UNIQ_A) - duplicate keys found [email protected] I think from here on out I'll be using asktom in the same way that I use google to find out how to fix my problems..in the error message and see what happens.
Tom, you rock Tom, The Oracle 9i Database Administrator's Guide says "Enabling a constraint does not require validation." Is this statement correct?
If I disable RI constraint, load orphaned data into child table and try to enable the RI, I always get an error saying that parent keys not found.