0

I observed a strange thing in INT for MySQL. I declared the length of int as 1, and to my surprise, the table accepts a value of 1234565675.

Screen shot for the same:

enter image description here

Can someone let me know what is exactly happening?

Obsidian Age
  • 41,205
  • 10
  • 48
  • 71
Pradeep Kumar
  • 51
  • 1
  • 6
  • 2
    You don't declare actual lengths of int data types in MySQL; that numeric specifier is/can be used as a hint for display purposes; but every `int` field holds a 32-bit integer value. – Uueerdo Oct 25 '17 at 22:16
  • 1
    AFAIK without `ZEROFILL` the "length" of INT has no meaning. – Paul Spiegel Oct 25 '17 at 22:18

0 Answers0