mysql字段的增改

ALTER TABLE `class_student` ADD INDEX `student_id-class_id` (`student_id`, `class_id`);增加索引
alter TABLE `school_info` ADD `school_img` varchar(255) not null COMMENT  '学校校徽' after `school_name`; 增加字段
ALTER TABLE `classrooms` CHANGE `describe` `describe` VARCHAR(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '补充描述'; 修改字段

 

posted @ 2017-03-08 13:23  代罪羊  阅读(88)  评论(0编辑  收藏  举报