您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

SQLServer修改主键

bubuko 2022/1/25 20:07:47 sqlserver 字数 837 阅读 1436 来源 http://www.bubuko.com/infolist-5-1.html

TRUNCATE TABLE reports_Transformations_Months ALTER table reports_Transformations_Months DROP CONSTRAINT PK_reports_Transformations_Months; ALTER tabl ...
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

 

SQLServer修改主键

原文:https://www.cnblogs.com/dzw159/p/12427307.html


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶