Get integer part of number

前端 未结 3 1344
情深已故
情深已故 2021-01-07 18:21

So I have a table with numbers in decimals, say

id    value
2323   2.43
4954  63.98

And I would like to get

id    value
232         


        
3条回答
  •  攒了一身酷
    2021-01-07 18:58

    SELECT FLOOR(value)
    

    http://msdn.microsoft.com/en-us/library/ms178531.aspx

    FLOOR returns the largest integer less than or equal to the specified numeric expression.

提交回复
热议问题