CAST DECIMAL to INT

后端 未结 10 2335
攒了一身酷
攒了一身酷 2020-12-13 01:49

I\'m trying to do this:

SELECT CAST(columnName AS INT), moreColumns, etc
FROM myTable
WHERE ...

I\'ve looked at the help FAQs here: http://

10条回答
  •  一个人的身影
    2020-12-13 02:17

    Try cast (columnName as unsigned)

    unsigned is positive value only

    If you want to include negative value, then cast (columnName as signed),
    The difference between sign (negative include) and unsigned (twice the size of sign, but non-negative)

提交回复
热议问题