title: SQL: ALTER COLUMN to shorter CHAR(n) type
body: <p>I'm working with MS SQL SERVER 2003.  I want to change a column in one of my tables to have fewer characters in the entries.  This is identical to this question: <a href="https://stackoverflow.com/questions/2281336/altering-a-table-column-to-accept-more-characters">Altering a Table Column to Accept More Characters</a> except for the fact that I want fewer characters instead of more.</p>
  
  <p>I have a column in one of my tables that holds nine-digit entries.  A developer previously working on the table mistakenly set the column to hold ten-digit entries.  I need to change the type from <code>CHAR(10)</code> to <code>CHAR(9)</code>.</p>
  
  <p>Following the instructions from the discussion linked above, I wrote the statement</p>
  
  <blockquote>
    <p>ALTER TABLE [MY_TABLE] ALTER COLUMN [MY_COLUMN] CHAR(9);</p>
  </blockquote>
  
  <p>This returns the error message "String or binary data would be truncated".  I see that my nine-digit strings have a space appended to make them ten digits.</p>
  
  <p>How do I tell SQL Server to discard the extra space and convert my column to a CHAR(9) type?</p>