(1):
cast 是进行类型转换的
select cast('2222' as integer) from table
select cast('222231' as decimal(10,2)) from table
(2)decimal
1
select cast('2222314.996' as decimal(10,2)) from table
这个加在一起刚好是10位,小数点右边3
其实你是8位数据
比如
select cast('123456789' as decimal(10,2)) from table
将报告overflow应该是说小数点右边预留了空间
cast 是进行类型转换的
select cast('2222' as integer) from table
select cast('222231' as decimal(10,2)) from table
(2)decimal
1
select cast('2222314.996' as decimal(10,2)) from table
这个加在一起刚好是10位,小数点右边3
其实你是8位数据
比如
select cast('123456789' as decimal(10,2)) from table
将报告overflow应该是说小数点右边预留了空间