update 相关
表中三个字段
aa,bb,cc
使cc=aa*1000000/bb
aa,bb 为int型
cc 为char(20)
update table1 set cc=aa*1000000/bb where bb<>0
却提示出错:
Server: Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type int.
The statement has been terminated.
如果改为100000就行了。
这是为什么?