Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> RE: check constraint question

RE: check constraint question

From: Roman Mirzaitov <mromka_at_MailAndNews.com>
Date: Thu, 10 May 2001 01:38:16 -0400
Message-ID: <3B009166@MailAndNews.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US