MySQL database names are case-sensitive, depending on the file system, Windows does not differentiate, Linux differentiates.
MySQL Database type
integer type: TINYINT SMALLINT mediumint INT BIGINT
Number of bytes: 1 2 3 4 8
modifier unsigned (unsigned) not null (non-empty)
Floating-point type: single-precision (float) double-precision (double)
Number of bytes: 4 8
fixed-point number type: DECIMAL (M,D)
Number of bytes: m+2
Date and time format:
| Data type |
Number of bytes |
Range of values |
Date format |
0 value |
| Year |
1 |
1901-2155 |
YYYY |
0000 |
| DATE |
4 |
1000-01-01~9999-12-3 |
Yyyy-mm-dd |
0000-00-00 |
| Time |
3 |
-838:59:59~838:59:59 |
HH:MM:SS |
00:00:00 |
| Datetime |
8 |
1000-01-01 00:00:00~9999-12-31 23:59:59 |
Yyyy-mm-dd HH:MM:DD |
0000-00-00 00:00:00 |
| TIMESTAMP |
4 |
1970-01-01 00:00:01~2038-01-19 03:14:07 |
Yyyy-mm-dd HH:MM:DD |
0000-00-00 00:00:00 |
string and binary types
| Data type |
Type description |
|
| CHAR |
Fixed-length strings |
|
| VARCHAR |
Variable-length strings |
|
| BINARY |
Fixed-length binary |
|
| Varbiary |
Variable-length binary |
|
| Blob |
Binary Big Data |
Tablets, PDF documents |
| TEXT |
Large text data |
Article |
| Enum |
Enum type |
|
| SET |
String Object |
|
| BIT |
Bit field type |
|
This article is from "Up for the future ..." Blog, be sure to keep this source http://goodang.blog.51cto.com/10277564/1762770
MySQL data type (02)