触发此查询后出现错误。
select COUNT(*)
from [DB1].dbo.Transaction(nolock) t
join [DB2].dbo.visits (nolock) v
on t.V_ID=v.V_ID
where t.Ct_ID=11
and t.Timestamp>'06-08-2015'
and v.C_ID is null
错误:
Msg 8115, Level 16, State 2, Line 2 Arithmetic overflow error converting expression to data type int
最佳答案
尝试使用 COUNT_BIG
而不是 COUNT
。
阅读this article了解更多信息。此外,this显示了不同类型的 INT
的限制。
关于sql - 消息 8115,级别 16,状态 2,第 2 行算术溢出错误将表达式转换为数据类型 int,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30772309/