alter table 表名 drop foreign key 外键约束名称

例如:FK_105

查看约束:

在mysql的资料栏里面有

MySql删除外键约束关系

 

查看某个表或者某个列的外键信息:

select * from information_schema.key_column_usage where referenced_table_name='表名';  

如果想查看某一列的外键关系,需要添加列的条件:referenced_column_name.列名=列名;

 

相关文章:

  • 2021-06-14
  • 2021-07-14
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
猜你喜欢
  • 2021-09-08
  • 2022-12-23
  • 2021-07-07
  • 2021-12-19
  • 2022-12-23
  • 2021-08-13
相关资源
相似解决方案