摘要: 在删除主表数据时,报了一个异常Cannot delete or update a parent row: a foreign key constraint fails原因是主表中还包含字表的数据,不能删除与这张表或数据有关联的字段,所以无法删除解决办法:在创建数据库的外键时,将删除的动作配置由RESTRICT改成cascade,就可以解决. 阅读全文
posted @ 2014-02-28 19:30 E_star 阅读(1014) 评论(0) 推荐(0) 编辑