美文网首页
HIVE插入timestamp与date类型

HIVE插入timestamp与date类型

作者: 带着二娃去遛弯 | 来源:发表于2019-05-22 09:27 被阅读0次

建表
CREATE TABLE default.ALLTYPE (
SMALLINTCOLUMN SMALLINT,
INTCOLUMN INT,
DOUBLECOLUMN DOUBLE,
STRINGCOLUMN STRING,
TIMESTAMPCOLUMN TIMESTAMP,
DECIMALCOLUMN DECIMAL(22,2),
VARCHARCOLUMN VARCHAR(100),
CHARCOLUMN CHAR(10),
DATECOLUMN DATE,
BINARYCOLUMN BINARY,
BIGINTCOLUMN BIGINT,
BOOLEANCOLUMN BOOLEAN,
FLOATCOLUMN FLOAT,
TINYINTCOLUMN TINYINT
) ;
插入语句:注意timestamp与date类型
INSERT INTO default.alltype
select 4, 100, 30.25,'jdashfldhwhreovcqhqoiewjq',current_timestamp(), 120.01,'this is varchar colum', 'char column', '2019-05-22', '0101010000101',1234567,true,90.2,1;

INSERT INTO default.alltype
select 4, 100, 30.25,'jdashfldhwhreovcqhqoiewjq',current_timestamp(), 120.01,'this is varchar colum', 'char column', null, null,1234567,true,90.2,1;

相关文章

网友评论

      本文标题:HIVE插入timestamp与date类型

      本文链接:https://www.haomeiwen.com/subject/mwzezqtx.html