我正在删除FK表中的记录。但它除了冲突之外。 [英] I am deleting a record from table having the FK. But it makes exception of conflict.

查看:96
本文介绍了我正在删除FK表中的记录。但它除了冲突之外。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

冲突。正在其他表中使用。但这里是相反的。我想要记录它用作FK的记录。 :/



我尝试过的事情:



我不知道知道该做什么,除了搜索

conflict occurs when i delete a record from a table whose ref. is being used in other table. but here it is reverse. I want to del a record where it was used as FK. :/

What I have tried:

I don't know what to do except the search

推荐答案

您可能需要 CASCADE 删除,请参阅此处的示例:如何使用SQL Server进行级联删除? - 堆栈溢出 [ ^ ]
You might need CASCADE delete, see examples here: How do I use cascade delete with SQL Server? - Stack Overflow[^]


这篇关于我正在删除FK表中的记录。但它除了冲突之外。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆