字符串或二进制数据将在删除时被截断
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想确切地知道它是如何删除它们的,请尝试在通过 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.