Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

The (5) represents the display width of the field. From the
manual, it states:

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. For example, a column
specified as SMALLINT(3) has the usual SMALLINT range of -32768 to
32767, and values outside the range permitted by three digits are
displayed in full using more than three digits.

The display width, from what I can tell, can be used to left-pad
numbers that are less than the defined width. So 00322, instead of
322. TBH, I've never used it.

But it doesn't affect the storage size of the column. An int will take
up more space than a smallint.