修改表名:
alter table 表名 rename to 新表名;
添加主键约束:
alter table 表名 add constraint 主键名 primary key 主键字段;
添加外键约束:
alter table 表名 add constraint 外键名 foreign key 外键字段;
删除主键、外键约束:
alter table 表名 drop primary key ;
alter table 表名 drop foreign key 外键名;
添加列:
alter table 表名 add column 列名 列属性;
删除列:
alter table 表名 drop column 列名;
修改列:
alter table 表名 change 列名 新列名 列属性;