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


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 -548

   
 
  • Causa
    • A CHECK CONSTRAINT THAT IS DEFINED WITH column-name IS INVALID.

      A check constraint in the CREATE TABLE or ALTER TABLE statement is not valid for one or more of the following reasons:
      • The constraint definition refers to a column that has a field procedure.
      • The constraint definition refers to a column with a data type that is lower in the hierarchy of numeric data types than the data type of any other operand.
        The hierarchy is as follows:
        
                           small integer < large integer 
                           < big integer < decimal
                           < single precision float 
                           < double precision float
      • The constraint definition refers to a column with a numeric data type that is not the same numeric data type as that of the other column operands.
      • The constraint definition refers to a column with a length that is shorter than the other operands when the column and other operands are not character string data types.
      • The constraint definition refers to a ROWID column.
      • The constraint definition refers to a LOB column.
      • The constraint definition refers to a DECFLOAT column.
      • The constraint definition refers to a Unicode column in an EBCDIC table.
      • The constraint contains an XML column.
      • The constraint definition contains an XMLQuery expression.
      • An XMLQUERY or XMLEXISTS argument list contained two arguments with the same name.
      • The generated column expression references a column for a column mask is defined.
      • The constraint definition contains a built-in function that depends on the value of a special register.
      • The constraint definition contains a global variable.
  • Ação do sistema
    • The statement is not executed.

      For ALTER TABLE, the check constraint is not added to the object table.
      The definition of the table is unchanged.

      For CREATE TABLE, the table is not created.
  • Resposta ao Desenvolvedor
    • Correct the check constraint definition and execute the statement again.

      SQLSTATE: 42621

© Copyright IBM Corp.