title: MySQL convert column datatype from VARCHAR to INT
body: <p>I have a MySQL table with a VARCHAR(25) column that I want to convert to INT.  All of the data in the column is either integer or blanks.  I have tried this command:</p>
  
  <pre><code>ALTER TABLE ip MODIFY isp INT UNSIGNED NOT NULL;
  </code></pre>
  
  <p>Unfortunately, since some of the existing rows are empty I get this error:</p>
  
  <pre><code>ERROR 1366 (HY000): Incorrect integer value: '' for column 'isp' at row 2
  </code></pre>
  
  <p>Thanks for assistance.</p>