Answer No: 100
In MySQL 5 Certification Study Guide, integer data types are described as below:
For storing numeric data, MySQL provides integer data types.
Integer data types include TINYINT, SMALLINT, MEDIUMINT, INT, and BIGINT. Smaller integer types require less storage space, but are more limited in the range of values they represent. For example, TINYINT column values take only one byte each to store, but the type has a small range (–128 to 127). INT column values require four bytes each, but the type has a much larger range (–2,147,483,648 to 2,147,483,647). The integer data types are summarized in the following table, which indicates the amount of storage per value that each type requires as well as its range. For integer values declared with the UNSIGNED attribute, negative values are not allowed, and the high end of the range shifts upward to approximately double the maximum positive value of the signed range.
Type |
Storage Required |
Signed Range |
Unsigned Range |
TINYINT |
1 byte |
–128 to 127 |
0 to 255 |
SMALLINT |
2 bytes |
–32,768 to 32,767 |
0 to 65,535 |
MEDIUMINT |
3 bytes |
–8,388,608 to 8,388,607 |
0 to 16,777,215 |
INT |
4 bytes |
–2,147,683,648 to 2,147,483,647 |
0 to 4,294,967,295 |
BIGINT |
8 bytes |
–9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 |
0 to 18,446,744,073, 709,551,615 |
Related MySQL FAQs to the Above FAQ
|