Does anyone one know when is the best time to use each one of the above. I'm confused.
If I can do INT(10) then why would I use BIGINT(10), I'm confused by the whole thing.
Type Bytes Minimum Value Maximum Value
(Signed/Unsigned) (Signed/Unsigned)
TINYINT 1 -128 127
0 255
SMALLINT 2 -32768 32767
0 65535
MEDIUMINT 3 -8388608 8388607
0 16777215
INT 4 -2147483648 2147483,647
0 4294967295
BIGINT 8 -9223372036854775808 9223372036854775807
0 18446744073709551615
The problem I have is I see databases with BIGINT(10) INT(10) and it confuses me why people choose one way or the others it seems like if you choose INT then you would always want INT(10) not INT(5).
In other words if your going to use INT then why not use it's max value or maybe I'm missing what is meant by INT(5)?