I am trying to add a column after another column while also specifying a default value. Below is my attempt that does not work.
alter table pageareas add content_userDefined BIT( 1 ) NULL default 0 after content;
If I remove “after content” it works:
alter table pageareas add content_userDefined BIT( 1 ) NULL default 0;
And if I remove “default 0” it works:
alter table pageareas add content_userDefined BIT( 1 ) NULL after content;
How can I accomplish adding it after a specified column while also defining a default value?
I am using MySql 5.1.36
If I’m reading the documentation for
alter tablecorrectly this time… you’re only able to specifyafterordefault, but not both. You could work around this by creating the column usingafter, and then altering it to have thedefault: