Value range of various fields in mysql

xiaoxiao2021-03-06  51

Value range of various fields in mysql

TINYINT -128 - 127 TINYINT UNSIGNED 0 - 255 SMALLINT -32768 - 32767 SMALLINT UNSIGNED 0 - 65535 MEDIUMINT -8388608 - 8388607 MEDIUMINT UNSIGNED 0 - 16777215 INT or INTEGER -2147483648 - 2147483647 INT UNSIGNED or INTEGER UNSIGNED 0 - 4294967295 BIGINT -9223372036854775808 - 9223372036854775807 BIGINT UNSIGNED 0 - 18446744073709551615 FLOAT -3.402823466E 38 - -1.175494351E-38 0 1.175494351E-38 - 3.402823466E 38 DOUBLE or DOUBLE PRECISION or REAL -1.7976931348623157E 308 - -2.2250738585072014E-308 0 2.2250738585072014E-308 - 1.7976931348623157E 308 DECIMAL [(M, [D])] or NuMERIC (M, D) by m (the length of the entire number, including the number of digits, the number of digits on the left side, the number of digits on the right side, but does not include the negative) And D (number of digits on the right side) is determined, M default is 10, D default is 0 DATE 1000-01-01 - 9999-12-31 datetime 1000-01-01 00:00:00 - 9999-12 -31 23:59:59 TimeStamp 1970-01-01 00:00:00 - 2037 a day (which day I don't know, huh, huh) Time -838: 59: 59 to 838: 59: 59 Year [(2 | 4)] The default is 4-bit format, 4-bit format ranges from 1901 - 2155,0000, 2-bit format range from 70-69 (1970-2069) char (m) [binary] Or nchar (m) [binary] m ranges from 1 - 255, if there is no binary item, it is not case-sensitive, nchar means using the default character set. In the database, it is completed in space, but at the end of the time. Space will be automatically Remove. [National] VARCHAR (M) [binary] m ranges from 1 - 255. The space at the end of the database will be automatically removed. Tinyblob or Tinytext 255 (2 ^ 8-1) characters BLOB or Text 65535 (2 ^ 16-1 characters Mediumblob or MediumText 16777215 (2 ^ 24-1) characters Longblob or Longtext 4294967295 (2 ^ 32-1) characters ENUM ('Value1', 'Value2', ...) can have a total of 65535 Different value set ('Value1', 'Value2', ...) has up to 64 members

转载请注明原文地址:https://www.9cbs.com/read-116702.html

New Post(0)