无法从SQL Server 2008中删除数据 [英] Data Cannot delete from in SQL server 2008

查看:110
本文介绍了无法从SQL Server 2008中删除数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表,其中主键在许多表中使用外键约束.现在如果执行数据删除命令,则会出现以下错误.

''查询处理器在查询优化期间耗尽了堆栈空间.请简化查询''

因此,请任何人帮助我解决从我的主表中删除数据的问题.

I have a table which primary key uses foreign key constraint in many table.Now if execute data delete command then i get following error.

''The query processor ran out of stack space during query optimization. Please simplify the query''

So please any one help me for solving my problem to delete data from my master table.

推荐答案

您可以尝试先删除子表中的某些行,然后再删除它们.然后从主表中删除.
不过,将所有查询都放在一个事务中.
You could try to delete some of the rows from the child tables first and then delete from the master table.
Put all your queries in one transaction though.


这篇关于无法从SQL Server 2008中删除数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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