Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> RE: check constraint question
Dina,
there are data in ACTUAL table which don't comply with your constraint.
You can use the following ALTER TABLE syntax:
alter table actual
add constraint act_oth_tuition check ((acct != '0101') and (dept != 'OTH'))
enable novalidate;
Above insures that only new DML operations will be tested against the
constraint, but not the existing data.
In order to detect which data is wrong you can use EXCEPTIONS INTO clause.
For details see Oracle8 SQL Reference - CONSTRAINT clause.
Roman Mirzaitov
Brainbench MVP for Oracle Administration
www.brainbench.com
Received on Thu May 10 2001 - 00:38:16 CDT