July 12

Difference Between Integer Types in MySQL and Their Max Values

0  comments

In MySQL, there are 5 different integer types, and each type allows for different integer value sizes. In addition, each type can be signed or unsigned. If your value is always positive, then you can make your integer type unsigned.

The following table shows the values that different integer types (signed/unsigned) can hold:

Integer TypeStart ValueEnd Value
TINYINT-128127
TINYINT (Unsigned)0256
SMALLINT-32,76832,767
SMALLINT (Unsigned)065,535
MEDIUMINT-8,388,6088,388,607
MEDIUMINT (Unsigned)016,777,215
INT-2,147,483,6482,147,483,647
INT (Unsigned)04,294,967,295
BIGINT-9,223,372,036,854,775,8089,223,372,036,854,775,807
BIGINT (Unsigned)018,446,744,073,709,551,615

Other posts about scaling up businesses

I Only Own One Pair Of Shoes

Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
free playbook

Get Your Free 5E Playbook

My 5E playbook is now available for a limited time!

__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"62516":{"name":"Main Accent","parent":-1}},"gradients":[]},"palettes":[{"name":"Default Palette","value":{"colors":{"62516":{"val":"var(--tcb-skin-color-0)"}},"gradients":[]}}]}__CONFIG_colors_palette__
Get Your Playbook