首页  

clickhouse基础     所属分类 clickhouse 浏览量 1317
数据类型
整型 UInt8,UInt16,UInt32,UInt64,Int8,Int16,Int32,Int64
字符串型 
FixedString(N) N 最大字节数,String
时间类型 Date  DateTime
数组类型 Array(T)
元组 Tuple
结构 类似map 
枚举类型

默认值
默认值总是有的,不支持null,如果没有显示式指定的话,按字段类型处理
数字类型  0
字符串 空字符串
数组 空数组
日期 0000-00-00
时间 0000-00-00 00:00:00


物化列  MATERIALIZED 表达式 ,该列的值有表达式计算得到 ,不会出现在 select * 中
drop table if exists test.m2;
create table test.m2 (
 a MATERIALIZED (b+1)
,b UInt16
) ENGINE = Memory;
insert into test.m2 (b) values (1);
select * from test.m2;
select a, b from test.m2;


表达式列 ALIAS 与 物化列类似 ,不过不会做物理存储

create table test.m3 (a ALIAS (b+1), b UInt16) ENGINE = Memory;
insert into test.m3(b) values (1);
select * from test.m3;
select a, b from test.m3;


 SQL 使用 

 表引擎 

 clickhouse存储层与计算层  

上一篇     下一篇
hashCode和identifyHashCode区别

clickhouse表引擎

clickhouse SQL

clickhouse存储层与计算层

zookeeper集群搭建

互联网广告术语解释