What\'s the difference in int(11)
and int(11) UNSIGNED
?
UNSIGNED
is exactly that, its all positive (no sign) numbers. The size of bytes is the same, but if your data is never negative you can get larger positive numbers out of it. The 11 is the default of how many characters it will fetch and display. For the exact size, do a search for the DBMS you are using and the type.
An unsigned integer can handle values from 0 to 2^(size in bits of the integer field). A signed integer can handle values from -2^(size of the integer field-1) to 2^(size of the integer field-1)-1.