建表
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;
网友评论