MySQL テーブルの変更
登録データを削除せずにテーブル構造を変更する方法
テーブル名: temptable
増やしたい項目名: text1
テーブルに新規項目を追加する
ALTER TABLE temptable add text1 varchar(255);
名前変更(text1 -> text2 へ)
ALTER TABLE temptable change text1 text2 varchar(255);
名前変更(NOT NULL & default & cast_idの直後に追加)
ALTER TABLE gravure add is_disp char(1) NOT NULL default "" AFTER cast_id;
データ型変更
ALTER TABLE temptable modify text1 varchar(20);
削除
ALTER TABLE temptable drop text1;