ORA-12991: column is referenced in a multi-column constraint : Create Primary Key « Constraints « Oracle PL / SQL






ORA-12991: column is referenced in a multi-column constraint

   
SQL> create table registrations
  2   ( attendee    NUMBER(4)
  3   , course      VARCHAR2(6)
  4   , begindate   DATE
  5   , evaluation  NUMBER(1)
  6   , constraint  R_PK        primary key (attendee,course,begindate)
  7   ) ;

Table created.

SQL>
SQL>
SQL>
SQL>
SQL> alter table registrations
  2   drop  column begindate;
 drop  column begindate
              *
ERROR at line 2:
ORA-12991: column is referenced in a multi-column constraint


SQL>
SQL>
SQL> drop table registrations;

Table dropped.

SQL>
SQL>
SQL>

   
    
    
  








Related examples in the same category

1.Using a CREATE TABLE statement: create a table with primary key
2.Create a foreign key "set null on delete" with more than one field, and use desc to check
3.Violate the primary key and foreign key relation
4.One-to-one using a primary-key and foreign-key relationship
5.Use three columns as primary key
6.Set primary key when declaring a column