我的表dependents
只有一个外键,而且我不知道外键的名称,因此我想检索该键的名称并将其删除。
这是我尝试过的,但是没有用:
alter table dependents
drop constraint
select CONSTRAINT_NAME
from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where TABLE_NAME = 'dependents' and constraint_name like 'FK%';