This was tested on Oracle 11.2.0.2.7. While investigating something else today, I came across a new error message. It seems that you cannot have more than one referential integrity check between the same two columns:
SQL> alter table t2
2 add constraint check_number1
3 foreign key (col1)
4 references t1(col1)
5 on delete cascade
6 /
Table altered.
SQL> alter table t2
2 add constraint check_number2
3 foreign key (col1)
4 references t1(col1)
5 on delete cascade
6 /
foreign key (col1)
*
ERROR at line 3:
ORA-02275: such a referential constraint already
exists in the table
SQL>
No comments:
Post a Comment