Comparing 2 float values in sqlserver

后端 未结 1 1720
眼角桃花
眼角桃花 2021-02-07 15:51

I have a float variable-field1 in 2 tables-table1 & table2. When I query the table and check the values of the field both look identic

相关标签:
1条回答
  • 2021-02-07 16:31
    • Use ROUND to limit the decimal places
    • Use ABS(value1-value2) < 0.00001 with some suitable value
    • Don't use float
    0 讨论(0)
提交回复
热议问题