Why can't pk, and col1 be DROPSQLCREATETABLEtest2 (2 pkNUMBERPRIMARYKEY, 3 fkNUMBER, 4col1NUMBER, 5col2NUMBER, round (fk) REFERENCEStest2, 7CONSTRAINTck1CHECK (pk0andcol10 ),
Why can't pk, and col1 drop SQL CREATE TABLE test2 (2 pk NUMBER PRIMARY KEY, 3 fk NUMBER, 4 col1 NUMBER, 5 col2 NUMBER, 6 CONSTRAINT fk_constraint FOREIGN KEY (fk) REFERENCES test2, 7 CONSTRAINT ck1 CHECK (pk 0 and col1 0), 8 CONSTRAINT ck2
Why can't pk, col1 DROP
SQL> CREATE TABLE test2 (
2 pk number primary key,
3 fk NUMBER,
4 col1 NUMBER,
5 col2 NUMBER,
6 CONSTRAINT fk_constraint foreign key (fk) REFERENCES test2,
7 CONSTRAINT ck1 CHECK (pk> 0 and col1> 0 ),
8 CONSTRAINT ck2 CHECK (col2> 0)
9)
10/
The table has been created.
SQL> ALTER TABLE test2 DROP (pk );
Alter table test2 DROP (pk)
*
Row 3 has an error:
ORA-12992: Unable to delete parent key keyword Column
SQL> ALTER TABLE test2 DROP (col1 );
Alter table test2 DROP (col1)
*
Row 3 has an error:
ORA-12991: referenced column in Multi-column Constraints
SQL> ALTER TABLE test2 DROP (fk );
The table has been changed.
SQL> alter table test2 drop (col2 );
The table has been changed.
SQL>
I really don't understand NLP
SQL> ALTER TABLE test2 DROP (fk );
The table has been changed.
SQL> alter table test2 drop (col2 );
The table has been changed.
SQL>
Why can't pk, col1 DROP