添加
ALTER TABLE 表名 ADD CONSTRAINT PK_XXX PRIMARY KEY NONCLUSTERED (字段) go 唯一,非聚集索引 ALTER TABLE 表名 ADD CONSTRAINT PK_XXX PRIMARY KEY CLUSTERED (字段) go 唯一,聚集索引
删除
ALTER TABLE 表名 DROP CONSTRAINT PK_XXX go
标签:CONSTRAINT,XXX,server,索引,表名,sql,go,PK,主键 From: https://www.cnblogs.com/qingjiawen/p/17755430.html