1,主键的删除
ALTER TABLE TABLENAME DROP PRIMARY_KEY
运行上面的SQL能够删除主键;假设不成功能够用
ALTER TABLE TABLENAME DROP CONSTRAINTS COLUMN CASCADE; --删除约束
ALTER TABLE TABLENAME DISABLE PRIMARY_COLUMN ; --设置被设置为主键的列为无效
DROP INDEX INDEX_NAME; --删除主键索引
2,查看主键约束
SELECT * FROM USER_CONSTRAINTS WHERE CONSTRAINT_TYPE='P' AND TABLE_NAME='你要查看的表名' AND OWNER=USER
3,创建联合主键
ALTER TABLE ADD CONSTRAINTS '约束名' PRIMARY KEY (COLUMN,COLUMN,...);