
You can specify a width of up to 9 digits.īIGINT − A large integer that can be signed or unsigned. If unsigned, the allowable range is from 0 to 16777215. If signed, the allowable range is from -8388608 to 8388607.

MEDIUMINT − A medium-sized integer that can be signed or unsigned. You can specify a width of up to 5 digits. If unsigned, the allowable range is from 0 to 65535. If signed, the allowable range is from -32768 to 32767. SMALLINT − A small integer that can be signed or unsigned. You can specify a width of up to 4 digits. If unsigned, the allowable range is from 0 to 255. If signed, the allowable range is from -128 to 127.

TINYINT − A very small integer that can be signed or unsigned. You can specify a width of up to 11 digits. If unsigned, the allowable range is from 0 to 4294967295. INT − A normal-sized integer that can be signed or unsigned. The following list shows the common numeric data types and their descriptions − MySQL uses all the standard ANSI SQL numeric data types, so if you're coming to MySQL from a different database system, these definitions will look familiar to you.

MySQL uses many different data types broken into three categories − These type of fields (or columns) are also referred to as data types, after the type of data you will be storing in those fields. For example, do not define a field 10 characters wide, if you know you are only going to use 2 characters. You should use only the type and size of field you really need to use. Properly defining the fields in a table is important to the overall optimization of your database.
