Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> check constraint question
Hi,
I am still learning so I apologize in advance if this is an easy question. I am trying to put a check constraint on a table, with 2 checks, like so:
alter table actual
add constraint act_oth_tuition check ((acct != '0101') and (dept != 'OTH'));
so that if somebody tries to enter values into the table in dept OTH, acct 0101, they are not allowed. I am getting the following error:
add constraint act_oth_tuition check ((acct != '0101') and (dept != 'OTH'))
*ERROR at line 2:
There is no data in these rows, which the error code refers to (as far as I can tell), and the constraint does not already exist. Can somebody tell me if this type of constraint is allowed... I am running it on 3 tables. One table accepts the constraint and the other 2 give the error.
Thanks
Dina
Received on Wed May 09 2001 - 11:52:14 CDT