SQL>
SQL> alter table A
2 drop constraint ABCD primary key (A)
3 disable
4 novalidate;
alter table A
drop constraint ABCD primary key (A)
disable
novalidate
ORA-01735: invalid ALTER TABLE option
SQL>
SQL> alter table A
2 drop constraint ABCD primary key (A)
3 disable
4 novalidate;
alter table A
drop constraint ABCD primary key (A)
disable
novalidate
ORA-01735: invalid ALTER TABLE option
SQL>
SQL> alter table A
2 drop constraint ABCD
3 ;
alter table A
drop constraint ABCD
ORA-02273: this unique/primary key is referenced by some foreign keys
SQL>
SQL> alter table B
2 drop constraint abc
3 ;
alter table B
add constraint abc
ORA-00931: missing identifier
SQL> alter table B drop constraint abc;
Table altered
SQL>
SQL> alter table B
2 add constraint abc foreign key (A)
3 references a (A)
4 disable
5 novalidate;
Table altered
SQL> alter table B drop constraint abc;
Table altered
SQL> alter table A drop constraint ABCD;
Table altered
SQL> alter table B add constraint abc foreign key (A) references a (A) disable novalidate;
alter table B add constraint abc foreign key (A) references a (A) disable novalidate
ORA-02270: no matching unique or primary key for this column-list
SQL>
SQL> alter table A
2 add constraint ABCD primary key (A)
3 disable
4 novalidate;
Table altered
SQL> alter table B add constraint abc foreign key (A) references a (A) disable novalidate;
Table altered
SQL>