0

How to Fix integer overflow issue ?

I am developing an application where user can input large Numbers. Now I am facing integer overflow issue.

I set my column data type is int(10).

abu abu
  • 6,599
  • 19
  • 74
  • 131
  • 2
    What is the datatype of the relevant column? – Dekel Dec 26 '18 at 14:13
  • Thanks @Dekel. Integer datatype. – abu abu Dec 26 '18 at 14:16
  • 1
    Please review https://dev.mysql.com/doc/refman/8.0/en/integer-types.html and this https://stackoverflow.com/questions/5634104/what-is-the-size-of-column-of-int11-in-mysql-in-bytes for an explanation of int(11). – P.Salmon Dec 26 '18 at 14:39
  • 1
    Possible duplicate of [What is the size of column of int(11) in mysql in bytes?](https://stackoverflow.com/questions/5634104/what-is-the-size-of-column-of-int11-in-mysql-in-bytes) – P.Salmon Dec 26 '18 at 14:41
  • Thanks @P.Salmon. If I input value `224,555,588,222,227.00` I am getting output `224.00`. – abu abu Dec 26 '18 at 15:14
  • I doubt if that is how you inserting this value since comma delineates the values to be inserted to separate columns, also why are you using an int field then attempting to insert a decimal number? If you want to insert a number you should not be inserting a number with 1000 separators. Can you add your full insert statement please. – P.Salmon Dec 26 '18 at 15:25
  • Thanks @P.Salmon. What is good fit for this number ? – abu abu Dec 26 '18 at 15:27

0 Answers0