易忘的mysql语句
1.修改主键
ALTER TABLE `resource` DROP PRIMARY KEY ,
ADD PRIMARY KEY ( `rid` )
2.加上auto_increment
ALTER TABLE `oinfo` CHANGE `orid` `orid` INT( 11 ) NOT NULL AUTO_INCREMENT
3.mysql命令窗口显示乱码
在命令窗口里,在查询之前执行set charset gbk;
4.手动加多一列
ALTER TABLE table_name ADD column_name TYPE;