添加字段: 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 n…
修改表的类型为 INNODB 的 SQL: alter table category_ ENGINE = innodb; 查看表的类型的 SQL show table status from tableName; 不过有个前提,就是当前的 MYSQL 服务器本身要支持 INNODB, 如果不支持,请看 开启 MYSQL INNODB 的办法…
定义: 索引是一种单独的.物理的对数据库表中一列或多列的值进行排序的一种存储结构 #为字段创建索引 #在表中的字段中创建索引mysql> create index ind_score on score(name); Query OK, rows affected (0.03 sec) Records: Duplicates: Warnings: #查看索引 mysql> show index from score; +-------+------------+-----------+---…