Reputation: 1127
I have a foreign constraint as below. This was created like three years ago. All the data that are created after this constraint are valid but the backlog data (data before three years) are not valid. Toad shows this constraint as 'Not Validated'
ALTER TABLE ISSUES ADD (
CONSTRAINT FK_CLIENT
FOREIGN KEY (CLIENT)
REFERENCES REPORTERS(USERID)
DEFERRABLE INITIALLY DEFERRED);
Today i fixed all the backlog data and now this constraint will hold good both for existing as well as new data. But how will i make the constraint as 'Validated'.
Is there any way to 're-validate' a foreign constraint?
Upvotes: 5
Views: 13124
Reputation: 43523
You should be able to:
ALTER TABLE issues ENABLE VALIDATE CONSTRAINT fk_client;
Upvotes: 6