title: ORA-01440: column to be modified must be empty to decrease precision or scale
body: <p>I have an Oracle table called Products. It has a ID column with the type of <code>NUMBER</code>.</p>
  
  <p>I'd like to change its type to <code>Number(20, 0)</code> but it's giving me this error:</p>
  
  <blockquote>
  <pre><code>ORA-01440: column to be modified must be empty to decrease precision or scale
  </code></pre>
  </blockquote>
  
  <p>So I've used this script:</p>
  
  <pre><code>alter table Products add ID_TEMP NUMBER(20,0);
  
  update Products set ID_TEMP = ID;
  
  update Products set ID = NULL;
  
  alter table Products modify ID NUMBER(20,0);
  
  update Products set ID = ID_TEMP;
  
  alter table Products drop column ID_TEMP;
  </code></pre>
  
  <p>But it complains that </p>
  
  <blockquote>
  <pre><code>cannot update ID to NULL
  </code></pre>
  </blockquote>
  
  <p>which is reasonable as it's a not nullable primary key.</p>
  
  <p>How to change its datatype from <code>Number</code> to <code>Number(20, 0)</code>?</p>