title: MySQL: alter table foo alter column binary(6) --- column is presently int(5)
body: <p>Is it possible to convert an integer column in MySQL into a binary column and preserve the data?
  I want to just convert it byte for byte, as you could see in a C union.</p>
  
  <p>Addendum: I tried this:</p>
  
  <p>alter table foo change colname colname binary(6);</p>
  
  <p>...however what this does is convert the string representation of the int(5) into a binary.
  I want to convert the underlying integer bytes into the binary.</p>
  
  <p>Is there a way to do this?</p>
  
  <p>Thus for instance if the integer was 100, I want the binary to be 0x64 0x0 0x0 0x0 0x0 0x0.</p>
  
  <p>Thanks.</p>