读书人

两个Int类型的字段除了结果还是Int?该

发布时间: 2012-01-12 22:11:58 作者: rapoo

两个Int类型的字段除了结果还是Int?
表字段:

aa int
bb int
cc char

select cc from table where aa/bb > =0.95

这里面aa/bb的结果还是Int类型的么?

以前没有遇到过,请问一下,该怎么处理?

[解决办法]
或者

select cc from table where cast(aa as numeric(18,2))/bb > =0.95
[解决办法]
select cc from table where cast(aa as decimal(18,2))/bb > =0.95

读书人网 >SQL Server

热点推荐