use add [column] AFTER [col_name] syntax to avoid table rebuild
When adding a column mid table and enforcing column order, it would be better to use the AFTER keyword to avoid a table rebuild. e.g.
alter table test_col2 add column d int after c;
8
votes
![](https://secure.gravatar.com/avatar/f582dfabf1d8c3b15fa270d9912cf6bc?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)