BIGINT UNSIGNED VALUE IS out of range My SQL

后端 未结 9 860
一向
一向 2020-12-18 19:11

I\'m getting the following error

#1690 - BIGINT UNSIGNED value is out of range in \'(legends.spawns.quantity -

9条回答
  •  感动是毒
    2020-12-18 20:02

    Another possible cause seems to be how the type of the result variable is allocated.

    eg.

    mysql> select (total_balance_06 * 0.045/(1-(1/1.045)^term_06) + unsec_instalments)/income from tbl_EUR_PDH;
    

    fails with

    ERROR 1690 (22003): BIGINT UNSIGNED value is out of range in '(1 - ((1 / 1.045) ^ markov.tbl_EUR_PDH.term_06))'

    whereas

    mysql> select (total_balance_06 * 0.045/(1.0-(1.0/1.045)^term_06) + unsec_instalments)/income from tbl_EUR_PDH;
    

    does what one would expect (note that I simply replace "1" by "1.0")

    Philippe

提交回复
热议问题