What is the difference between tinyint, smallint, mediumint, bigint and int in MySQL?
In what cases should these be used?
The size of storage required and how big the numbers can be.
On SQL Server:
tinyint 1 byte, 0 to 255smallint 2 bytes, -215 (-32,768) to 215-1 (32,767)int 4 bytes, -231 (-2,147,483,648) to 231-1 (2,147,483,647)bigint 8 bytes, -263 (-9,223,372,036,854,775,808) to 263-1 (9,223,372,036,854,775,807)You can store the number 1 in all 4, but a bigint will use 8 bytes, while a tinyint will use 1 byte.