【zz】mysql 添加字段、删除字段、调整字段顺序

转自http://www.cnblogs.com/lmjob/archive/2008/09/22/1295849.html

添加字段:

alter table `user_movement_log` 
Add column GatewayId int  not null default 0 AFTER `Regionid` (在哪个字段后面添加)

 删除字段:

alter table `user_movement_log` drop column Gatewayid

调整字段顺序:

ALTER TABLE `user_movement_log`  CHANGE `GatewayId` `GatewayId` int not null default 0  AFTER RegionID 

posted on 2012-04-24 11:09  zhanghw0354  阅读(163)  评论(0编辑  收藏  举报