SQL - SQLCODE's - Códigos negativos -542


Volta a página anterior

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

SQLCode -542

   
 
  • Causa
    • column-name 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.
  • Ação do sistema
    • The statement cannot be executed.
  • Resposta ao Desenvolvedor
    • 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.

      SQLSTATE: 42831

© Copyright IBM Corp.