Start of change

-373   DEFAULT CANNOT BE SPECIFIED FOR COLUMN OR SQL VARIABLE name

Explanation

The definition or change that was specified for the column or the SQL variable included the DEFAULT clause. However, DEFAULT is not supported for the column data type or SQL variable.

name
The name of the column or SQL variable.

Possible reasons for this error include the following situations:

  • A CREATE TABLE or ALTER TABLE statement attempted to define one of the following columns with the DEFAULT clause:
    • Identity column
    • ROWID column
    • XML column
    • Row change timestamp column
    • Security label column
    • Row begin column
    • Row end column
    • Transaction start ID column
  • The declaration of an SQL variable specified the DEFAULT clause, and the data type of the SQL variable is ROWID or XML.
  • A SET statement specified DEFAULT for the value of a ROWID column.

System action

The statement cannot be processed.

Programmer response

Remove the DEFAULT clause and resubmit the statement.

SQLSTATE

42623

End of change