Description
The MEDIUMINT data type represents an integer, which is medium-sized and can be either signed or unsigned.
The range for a signed MEDIUMINT is -8388608 to 8388607. The range for an unsigned MEDIUMINT is 0 to 16777215. The user can specify the width up to 9 digits.
This data type has the form:
MEDIUMINT[(M])] [UNSIGNED]
[ZEROFILL]
In this form, M indicates the maximum display width with a maximum value of 255.
Options | Description |
---|---|
UNSIGNED | If specified, disallows negative values. |
ZEROFILL | Specifies that the default padding of spaces is replaced with zeros. If you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column. |