logo  
Google
 

DB2 SQL-Error: -542

SQLState: 42831

Short Description: CANNOT BE A COLUMN OF A PRIMARY KEY A UNIQUE CONSTRAINT OR A PARENT KEY BECAUSE IT CAN CONTAIN NULL VALUES

The code is used to report that a column identified in a PRIMARY KEY, a UNIQUE constraint clause, or a parent key (via a REFERENCES clause) is defined to allow null values. System action: The statement cannot be executed. Programmer response: In the case of a column identified in a PRIMARY KEY or a UNIQUE constraint clause, correct the statement and rerun it. In the case of a column identified in a REFERENCES clause, drop the parent table then recreate it with referenced columns defined as NOT NULL. Afterwards, rerun the statement.

 <-  BACK TO INDEX