删除primary key
alter table tablename drop constraint tablename_pkey;
添加primary key
alter table tablename add primary key(colname);
添加/删除非空约束
alter table tablename alter COLUMN colname set/drop not null;
添加列
alter table tablename ADD colname datatype;
删除列
alter table tablename drop colname
更改列数据类型
alter table tablename alter colname TYPE datatype;
更改表名
alter table tablename RENAME TO newtablename