DB2数据库,时间类型插入数据
1、TIMESTAMP类型
1.1、创建表
CREATE TABLE BI_varchar (
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1 ),
hide_zero varchar(1000),
simulation_cphone_de varchar(1000),
disorder_de varchar(1000),
upfloat_de INTEGER,
downfloat_de INTEGER,
zero_de INTEGER,
sm3_de varchar(1000),
ip_prefix_de varchar(1000),
numerical_de INTEGER,
date_de TIMESTAMP,
mix_ph_de varchar(1000),
PRIMARY KEY (id)
)
1.2、时间类型TIMESTAMP插入数据
INSERT INTO db2inst1.BI_varchar(hide_zero,simulation_cphone_de,disorder_de,upfloat_de,downfloat_de,zero_de,sm3_de,ip_prefix_de,numerical_de,DATE_DE ,mix_ph_de) values (2345678,'010-68810345','123456789',500,500,381.11,'张三','10.1.1.196',28,current timestamp,'13789099800')
1.3、TIMESTAMP类型展示结果
2、date类型
insert into BI_varchar(DATE_DE)values(current date)