Mysql database design, which is important for data performance optimization and field type consideration. some information is collected and shared, this section describes the syntax of mysql bigint, int, mediumint, smallint, and tinyint, as follows:
1. Tinyint: Only 128 to 127 of the size of the number, do not care about the following definition, such as tinyint (9). Requires 1 bytes of storage space. When unsigned is added, the number can be increased from 0 to 255 size. [email protected]:
MySQL integer: TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT range: bitsCN.com
MySQL integer: TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT range
TINYINT: the signed range is-128 to 127, and the unsigned range is 0 to the power of 8.
SMALLINT: the
TINYINT, SMALLINT, MEDIUMINT, INT, INTEGER, BIGINT; text, longtext, mediumtext, ENUM, SET, and other field types, tinyintmediumint
Http://www.path8.net/tn/archives/951
MySQL supports a large number of column types, which can be divided into three
MySQL database design, which, for Data performance optimization, field type considerations are important, collected some information, organized to share, this is about the MySQL integer bigint, int, mediumint, smallint and tinyint syntax
MySQL database design, which, for Data performance optimization, field type considerations are important, collected some information, organized to share, this is about the MySQL integer bigint, int, mediumint, smallint and tinyint syntax
MySQL database design, which, for Data performance optimization, field type considerations are important, collected some information, organized to share, this is about the MySQL integer bigint, int, mediumint, smallint and tinyint syntax
74277381MySQL database design, where the performance optimization, field type is very important, the following bigint, int, mediumint, smallint and tinyint range of values for a simple summary, for viewing.1, bigintInteger data (all numbers) from -2^
Type
Space occupied by storage(no matter how many bits are displayed)(Unit byte/bytes)
Storing data ranges
Maximum display length
tinyint
1
-128 ~ 127 Signed0 ~ 255 Unsigned
3
Smaillint
1 bytes = 8 bit, a byte can represent a maximum of 2 of the data length is 8 square-128 to 127, unsigned from 0 to 255 of the integer data.Tinyint[(M)] [UNSIGNED] [Zerofill] M default is 4A small integer with a storage size of 1 bytes. The signed
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.