1.新增字段
alter table table1
add col1 int(2) not NULL DEFAULT 0 COMMENT '注釋1',
add col2 VARCHAR(300) DEFAULT NULL COMMENT '注釋2' 語法:alter table 表名 add 列名 int(2) 字段數據類型、長度 NOT NULL (是否可為空)DEFAULT 0 默認值
2.刪除字段
alter table id_name drop column age,drop column address;
語法:alter table 表名 drop column 列名