网站开发背景论文,中国建设银行注册网站用户名怎么填,手机网站活动策划方案,连云港seo1.alter操作表字段(1)增加字段alter table 表名 add 字段名 字段类型#xff1b;alter table student add name varchar(10)#xff1b;(2)修改字段alter table 表名 change 旧字段名 新字段名 字段类型#xff1b;alter table 表名 modify 字段名 字段类型#xff1b;//修…1.alter操作表字段(1)增加字段alter table 表名 add 字段名 字段类型alter table student add name varchar(10)(2)修改字段alter table 表名 change 旧字段名 新字段名 字段类型alter table 表名 modify 字段名 字段类型//修改字段类型alter table student change name name varchar(20)not null default liming//修改字段类型 default后边是字段默认的值alter table student change name name1 varchar(20)not null default liming//修改字段名(3)删除字段alter table 表名 drop 字段名alter table student drop name2.alter 索引操作(1)增加索引alter table 表名 add index 索引名 (字段名1字段名2.....)alter table student add index stu_name(name);(2)删除索引alter table 表名 drop index 索引名alter table student drop index stu_name(3)查看某个表的索引show index from 表名(4)增加唯一限制条件的索引alter table 表名 add unique 索引名(字段名)3.主键操作增加主键alter table 表名 add primary key(字段名)删除主键alter table 表名 drop primary key;(主键不是自动增长情况下)alter table 表名 modify 字段 字段类型 drop primary key;(主键是自动增长情况下)alter table 123 modify id intdrop primary key