2012年4月22日日曜日

mysqlのtips

*AUTO_INCREMENTの値をリセットする
ALTER TABLE hogetable AUTO_INCREMENT = 1;

http://www.programming-magic.com/20071126231401/

*列の追加
alter table log add date date after id;

http://www.programming-magic.com/20071004015528/

*列の削除
alter table log drop date;

(logテーブルからdateカラム削除)
http://www.programming-magic.com/20071023000012/

0 件のコメント: