MySQL Field Type

Source: Internet
Author: User

What are the MySQL field types? The following describes the MySQL Field Types for your reference.

The most important thing about the table structure is the field type and field constraints. Today, let's take a brief look at the MySQL field type. MySQL provides many different data types to process different data requirements. Reasonable Use of them can effectively reduce the table volume and save space, and avoid many program design problems (such as the value range is exceeded. Today we will give a summary and use the following table to give a clear explanation.

Type Description
INT A value type. The value range is-2147483648 ~ 2147483647 unsigned 0 ~ 4294967295, up to 10, so saving the mobile phone number is not acceptable.
DECIMAL A value type that supports floating point numbers or decimal places.
DOUBLE A value type that supports double-precision floating point numbers.
DATE Date Field in YYYYMMDD format
TIME HH: MM: time field in SS format
DATETIME Yymmdd hh: MM: SS format date/time type. Note the space between "year, month, day" and "hour, minute, second ".
YEAR In YYYY or YY format, the range is 1901 ~ Do not ask me about the year field specified Between 2155 and 2155. I guess I will not be able to live that year.
TIMESTAMP Timestamp in YYYYMMDDHHMMSS format
CHAR String type with a maximum length of 255 characters and a fixed length
VARCHAR String type with a maximum length of 255 characters but extended length
TEXT String type with a maximum length of 65535 characters
BLOB Binary type of variable data
ENUM Data types that can accept values from the list of defined values
SET The data type of zero or multiple values can be accepted from the set of defined values.

Seven considerations for converting MySQL to Oracle

New Pricing strategies for MySQL database products

Provides you with an in-depth understanding of MYSQL string connection

Implementation of MySQL + Apache cluster mode

Mysql table alias usage

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.