首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

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

2012-01-12 
两个Int类型的字段除了结果还是Int?表字段:aaintbbintcccharselectccfromtablewhereaa/bb 0.95这里面aa/

两个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

热点排行