Click here to Skip to main content
15,936,119 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm confused on the understanding of the integer lengths.
What does int(255) mean?
does that mean the numbers I can enter to the database numbers that can contain like 255 digits or what? Help me.

What I have tried:

I have two ideas on what it's suppose to mean, its either the number of digits or the value of a data.
example: int(255) => 255 or is it int(255) => 1234123151232....
Updated 10-Mar-16 9:02am

No direct help from me, because if you ask this, you have hundred of questions of the same king.

My advice: learn properly the language by reading documentation and follow tutorials. I know it is boring but it is the only way to knowledge, and there is no shortcut.
Learn to use Google as soon as possible. If something exist on internet, Google Know about it.
Share this answer
It means it's time to learn to read the documentation! :)

MySQL supports an extension for optionally specifying the display width of integer data types in parentheses following the base keyword for the type. For example, INT(4) specifies an INT with a display width of four digits.
The display width does not constrain the range of values that can be stored in the column. Nor does it prevent values wider than the column display width from being displayed correctly.


Type: INT
Minimum value: -2147483648
Maximum value: 2147483647

Not even a BIGINT could store a number with 255 digits!
Share this answer
Patrice T 10-Mar-16 15:23pm    
+5 :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900