首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

求sql话语判断小数点位数

2012-08-10 
求sql语句判断小数点位数idprice12.3322.323232.4442.2252.5334545...select * from 表whereprice小数点长

求sql语句判断小数点位数
id price
1 2.33
2 2.3232
3 2.44
4 2.22
5 2.5334545
...


select * from 表 where price小数点长度大于2



查询price字段小数点位数大于2的数

[解决办法]

SQL code
where charindex('.',REVERSE(cast(price as varchar(50))))-1>2 

热点排行