title: DB2 SQL Insert NULL into NOT NULL WITH DEFAULT
body: <p>I faced a problem when inserting a NULL value into a column defined as NOT NULL WITH DEFAULT values.
  In this example, I removed most of the columns for illustration purposes.</p>
  
  <pre><code>CREATE TABLE
      FKTIM04
      (
          OBJECTID CHARACTER(32) NOT NULL,
          UP_CHANGE_CL CHARACTER(1) DEFAULT '1' NOT NULL,
          UP_CTRL_CL CHARACTER(1) DEFAULT '0' NOT NULL,
          CONSTRAINT PK_FKTIM04 PRIMARY KEY (OBJECTID)
      );
  </code></pre>
  
  <p>When I execute this SQL statement, there is an error:</p>
  
  <pre><code>INSERT INTO KTI.FKTIM04 (
      UP_Change_CL
      ,UP_ctrl_CL
      ,ObjectID
      )
  VALUES (
      NULL
      ,NULL
      ,'UMSTM0LW8A8Z50DT4WA7U93EEQDRXRTH'
      )
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>[Code: -407, SQL State: 23502]  Assignment of a NULL value to a NOT
    NULL column "TBSPACEID=2, TABLEID=1298, COLNO=46" is not allowed..
    SQLCODE=-407, SQLSTATE=23502, DRIVER=4.22.29</p>
  </blockquote>
  
  <p>I know that the column is defined as NOT NULL. If it tries to insert a NULL into the column, shouldn't it take the DEFAULT value instead?</p>
  
  <p>Please teach me how to get the DEFAULT values to be inserted instead.
  What should I look out for?</p>
  
  <p>Thank you.</p>