Get integer part of number

前端 未结 3 1341
情深已故
情深已故 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:37

    Assuming you are OK with truncation of the decimal part you can do: SELECT Id, CAST(value AS INT) INTO IntegerTable FROM NumericTable

提交回复
热议问题