PDA

View Full Version : Can I alter the data type in an active MySQL file?


pvmaddox
08-04-2008, 01:27 PM
In an active MySQL database, I want to change the data type for the primary key from Tiny Int to Integer. Will this destroy the data in the database? Would it be wiser to use the Alter Key SET DEFAULT 1 command to reset the initial value. The key column is set to auto enter an incrementing ID number.

pvmaddox
08-04-2008, 03:28 PM
I changed the column type to Small Int and it didn't destroy any data. So it worked.