当前位置: 代码迷 >> ASP.NET >> 求sql话语判断小数点位数
  详细解决方案

求sql话语判断小数点位数

热度:1318   发布时间:2013-02-25 00:00:00.0
求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
  相关解决方案