mysql - Alter table with new default failing -
I am trying to update a table and change the default value for 0 on two columns instead of zero . The problem is that the reverse command fails because there are no empty values for those columns in many rows. Is there any way I could change the command and if it comes in a row with a zero value in an order set to 0? I can use a query to update rows with zero values, but I want to be able to run a command command using Percona Toolkit which will allow for online alter table commands.
null values to
0 Will have to change. Update Code> your_table set col = 0 where the kernel is redundant; Change table to change your_table kernel int not zero default 0;
Comments
Post a Comment