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