字符串或二进制数据将在删除时被截断

发布于 2024-09-06 16:37:10 字数 558 浏览 7 评论 0原文

SQL Server Management Studio删除几行

我正在尝试使用

,但仅删除 2 行时,我收到消息

“未删除任何行”

A problem occurred attempting to delete row #X
Error Source: .Net SqlClient Data Provider
Error Message: String or binary data would be truncated
The Statement has been terminated


Correct the errors and attempt to delete the row again or press ESC to cancel the change(s)

删除行时会发生什么情况?

键是唯一的,所以这不是问题

我已经使用手动 DELETE 语句删除了行,但对这里发生的事情感到好奇,

有什么想法吗?

这是使用 SQL 2008 R2 Express 版本

更新 - 表上没有触发器

I'm trying to delete a couple of rows

USING

SQL Server management studio, for 2 rows only i get the message

No rows were deleted

A problem occurred attempting to delete row #X
Error Source: .Net SqlClient Data Provider
Error Message: String or binary data would be truncated
The Statement has been terminated


Correct the errors and attempt to delete the row again or press ESC to cancel the change(s)

What could be happening while deleting the row ?

the keys are unique so that's not an issue

I've deleted the rows using manual DELETE statements but curious about what's going on here

any thoughts ?

this is using SQL 2008 R2 Express edition

UPDATE - there are no triggers on the table

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

叹沉浮 2024-09-13 16:37:11

如果您想确切地知道它是如何删除它们的,请尝试在通过 SSMS 删除时运行 SQL Profiler。

表上有删除触发器吗?可能是通过 GUI 而不是通过查询窗口登录到审计表中的变量之一更长。

无论如何,提供表定义和要删除的行可能会帮助其他人找到您问题的解决方案。

Try running SQL Profiler while deleting through SSMS if you want to know exactly how it's deleting them.

Do you have a delete trigger on the table? It could be that one of the variables that you're logging into an audit table is longer when going through the GUI instead of through the query window.

In any event, providing the table definition and the rows being deleted might help others find a solution to your question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文