title: How to add a PK to an existing table in DB2?
body: <p>I am facing one problem. I have a table already create in DB2.</p>
  
  <pre><code>CREATE TABLE "DDL12"
  (
   "D4_1" decimal(10,0),
   "D4_2" decimal(10,0),
  );
  </code></pre>
  
  <p>I am trying to create a PK on this table as :-</p>
  
  <pre><code>ALTER TABLE "DDL12" ADD CONSTRAINT "Key4" PRIMARY KEY ("D4_1");
  </code></pre>
  
  <p>But while running the command, I am getting the error saying D4_1 is NULLABLE.</p>
  
  <p>Now, how can I create a PK on this table?</p>
  
  <p>Thanks</p>