MySQL database design-best practices for various INTEGER types-MySQL
Source: Internet
Author: User
List of storage space and value ranges occupied by various INTEGER MySQL types List of storage space and value ranges occupied by various INTEGER MySQL types
Best practices
UNSIGNED can only store non-negative integer SIGNED. it can store positive integers, 0, and negative integers. The best practice for storing positive integers (such as primary keys) is UNSIGNED, because it occupies the same storage space as SIGNED, however, BOOL and BOOLEAN are two times more than TINYINT (1). TINYINT (1), BOOL, and BOOLEAN occupy the same storage space as TINYINT, it is a byte, not a value that can be stored by a TINYINT (1) in the same range as TINYINT, which is-128 to 127 TINYINT (1) only outputs data as a single position during display.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service