Blogger Information
Blog 29
fans 0
comment 0
visits 35016
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Mysql 表示日期的数据类型
小臣
Original
1058 people have browsed it

在开发过程中,肯定是要建数据库的,建完库,就要建表了。建表时,每个字段都会选择相应的字段数据类型,来保存数据,这里介绍的是日期的数据类型。

日期的数据类型:

year time date datetime timestamp

数据类型日期格式日期范围存储需求
YEARYYYYY1901 ~ 21551个字节
TIMEHH:MM:SS-838:59:59 ~ 838:59:593个字节
DATEYYYY-MM-DD1000-01-01 ~ 9999-12-33个字节
DATETIMEYYYY-MM-DD HH:MM:SS1000-01-01 00:00:00 ~ 9999-12-3 23:59:598个字节
TIMESTAMPYYYY-MM-DD HH:MM:SS1980-01-01 00:00:00 UTC ~ 2040-01-19 03:14:07 UTC4个字节


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post