ALTER TABLE tablename DROP CONSTRAINT primaryname。--修改表删除索引主键
alter table tableName add primary key(sid); --添加主键
抽数的时候如果有报唯一索引错的。对就是这么操作
GP sql 语法搜索 postgresql
alter table tableName alter column 列名 drop not NULL;--删除非空约束
列: name varchar not null;
原文:https://www.cnblogs.com/luckgood/p/9269709.html