– 时间属性(-838:59:59~838:59:59)
CREATE TABLE test_time
(
t TIME
);
INSERT INTO test_time VALUES(‘10:20:10’);
– 年份属性(1901~2155)
CREATE TABLE test_year
(
t YEAR
);
INSERT INTO test_year VALUES(‘1999’);
– 日期属性(1000-01-01~9999-12-3)
CREATE TABLE test_date
(
t DATE
);
INSERT INTO test_date VALUES(‘1999-09-09’);
– 日期属性(1000-01-01 00:00:00~9999-12-31 23:59:59)
CREATE TABLE test_datetime
(
t DATETIME
);
INSERT INTO test_datetime VALUES(‘1999-09-09 12:00:00’);
– 日期时间属性(1970-01-01 00:00:00 UTC ~2038-01-19 03:14:07 UTC)
CREATE TABLE test_timestamp
(
t TIMESTAMP
);
INSERT INTO test_timestamp VALUES(‘1999-09-09 01:00:00’);