如题,怎样先判断外键是否存在,然后在删除,像
if exists((select count(*) from information_schema.key_column_usage where constraint_name='fk_emp_dept_id') > 0)
alter table org_employee drop foreign key fk_emp_dept_;
id
还有,
if exists((select count(*) from information_schema.key_column_usage where constraint_name='fk_emp_dept_id') > 0)
begin
alter table org_employee drop foreign key fk_emp_dept_id;
end
都会报错,求大神解答
回复内容:
https://zhidao.baidu.com/question/692089969116125764.html







![如何从 Go 的 map[string]](http://public-space.oss-cn-hongkong.aliyucs.com/keji/305.jpg)
