肖sir__mysql__插入时间

create table t1 (
id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
d1_data date,
d2_time time,
d3_datatime datetime,
d4_year year,
d5_timestamp TIMESTAMP
);

INSERT INTO t1 (d1_data,d2_time,d3_datatime,d4_year,d5_timestamp) VALUES(NOW(),NOW(),NOW(),NOW(),NOW());

INSERT INTO t1 (d1_data) VALUES(20221205);
INSERT INTO t1 (d1_data) VALUES(20221206);
INSERT INTO t1 (d1_data) VALUES(20221207);
INSERT INTO t1 (d1_data) VALUES(20221208);
INSERT INTO t1 (d1_data) VALUES(20221209);
INSERT INTO t1 (d1_data) VALUES(20221210);
INSERT INTO t1 (d1_data) VALUES(20221211);
INSERT INTO t1 (d1_data) VALUES(20221212)
select * from t1 ;
INSERT INTO t1 (d1_data,d2_time,d3_datatime,d4_year,d5_timestamp) VALUES(2022-12-01,NOW(),NOW(),NOW(),NOW());

posted @ 2022-11-30 21:32  xiaolehua  阅读(49)  评论(0编辑  收藏  举报