通过约束查询约束所在的表名,并删除该约束

select * from sysobjects where id in (select parent_obj from sysobjects where id=object_id('FK_HR_SYS_I_REFERENCE_HR_SYS_S'))

 

alter table hr_sys_itemdict_Base

drop constraint FK_HR_SYS_I_REFERENCE_HR_SYS_S

原文地址:https://www.cnblogs.com/yinxingyeye/p/3610896.html