Change a Column's Data Type in MySQL (equivalent of ALTER COLUMN)
I just thought I'd post this little tip as the syntax difference between MySQL and Microsoft SQL Serverjust foxed me once again...
ALTER TABLE my_table CHANGE my_column my_column SMALLINT NOT NULL DEFAULT 0;
You may wonder why the column name is repeated twice, that's because the same syntax also allows you to rename the column at the same time. The syntax might be a little odd but it does makes sense if you think about it.