摘要: 1,删除原有主键:ALTER TABLE `table_name` DROP `id`;2,添加新主键字段:ALTER TABLE `table_name` ADD `id` MEDIUMINT( 8 ) NOT NULL FIRST;3,设置新主键:ALTER TABLE `table_name` MODIFY COLUMN `id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT,ADD PRIMARY KEY(id); 阅读全文
posted @ 2014-03-11 01:11 凌少 阅读(791) 评论(0) 推荐(0) 编辑