SQLServer修改主键

TRUNCATE TABLE reports_Transformations_Months
ALTER table reports_Transformations_Months DROP CONSTRAINT PK_reports_Transformations_Months;
ALTER table reports_Transformations_Months 
ADD CONSTRAINT PK_reports_Transformations_Months PRIMARY KEY(Id,Eid,AreaId,IndustryId);

注:清空数据,清除主键,重新定义主键(多个主键)

感谢:https://blog.csdn.net/onexin_smile/article/details/82022426

 

posted @ 2020-03-06 16:30  蜗牛的礼物  阅读(2342)  评论(0编辑  收藏  举报