I try to create a foreign constraint on a table but the data
of the table is "bad". so how can I "disable" the constraint when I create it.
thansk in advance
Just add the word 'disable' as the last thing
before your semi-colon or '/' in your command
to create the constraint.
do I have to enable later? (even with bad records)
sorry, my quesiton should be:
how I enable the constriant without correct those bad records
I think you can say
alter constraint .... enable novalidate;
to make it only check for rows you will add in the future
and ignore rows that are there already. I have never
tried this though so I could be wrong about it. Just look
in the oracle documentation in the SQL reference section
under 'alter constraint'.
thanks, I got the syntax and it works:
alter table tblname enable novalidate CONSTRAINT constname;
Click Here to Expand Forum to Full Width