Data types for MySQL

Source: Internet
Author: User

Numeric type

tinyint      Storage Range: 128 to 127 or 0 to 255          tinyint (1) smallint     storage range: 32768 to 32767 or 0 to 65535   smallint (3) Mediumint     Storage Range:- 8388608 to 8388607 or 0 to 16777215   mediumint (5) int           Storage Range:- 2147483648 to 2147483647 or 0 to 4294967295      int (Ten) bigint       storage range:-  9223372036854775808 to 9223372036854775807 or 0 to 18446744073709551615    bigint (Ten) float         Minimum non 0 value: ±1.175494351e – 38, same as double suitable for high precision applications      float (3,1) double       min non 0 value:±2.2250738585072014e - 308     double (10,5) decimal      value range variable, since the display size and the number of decimal places in parentheses, Suitable for applications where accuracy is not high but the accuracy requirement is very high    decimal (10,2)

Character type

Char supports fixed-length strings with a maximum length of 255 characters char (+) varchar supports variable-length strings, a maximum length of 65,535 characters varchar (tinytext) supports variable-length strings, and a maximum length of 255 Characters tinytexttext support variable-length strings, with a maximum length of 65,535 characters Textblob mediumtext supports variable-length strings with a maximum length of 16,777,215 characters Mediumtextmediumblob        LONGTEXT supports variable-length strings, with a maximum length of 4,294,967,295 characters Longtextlongblobenum enumeration type, which can store up to 65,535 members, often used for values that are limited and fixed enmu ("male", "female") set collection type, can store up to 64 member set ("Value1", "value2", ...)

Date type

Date YYYY-MM-DD format represents date value in datetime HH:MM:SS format represents a time value TIMEDATETIMEYYYY-MM-DD HH:MM:SS format represents a datetime value DATETIMETIMESTAMPYYYYMM The DDHHMMSS format represents the timestamp value timestampyear the year value in YYYY format


Data types for MySQL

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.