PK:

–增加

alter table AAA  add constraint aaa primary key (USERNAME);

ALTER TABLE AAA ADD CONSTRAINT aaa PRIMARY KEY(username) USING INDEX

 ALTER TABLE AAA ADD CONSTRAINT aaa PRIMARY KEY(username) USING INDEX aaa;

–删除

 ALTER TABLE AAA DROP PRIMARY KEY CASCADE; 

 alter table AAA  drop constraint bbb 

 alter table AAA  drop constraint bbb cascade

[……]

查看全文