创建表
create table blog(id UInt64,title String,content String,created_at DateTime)Engine=MergeTree order by id;
日期数据一般指定默认值
create table blog(id UInt64,title String,content String,created_at DateTime default now())Engine=MergeTree order by id;
插入测试数据
insert into blog(id,title,content) values(1,'测试1','有点小帅');
查询测试
select * from blog;
注意表名是区分大小写的
Select 则不区分大小写
distinct
和一般性的SQL一样
select distinct(title) from blog;
有没有mysql这样的自增长id呢
create table blog(id UInt64,title String,content String,created_at DateTime default now())Engine=MergeTree order by id;
标签:blog,String,title,DateTime,house,id,学习,content,click
From: https://www.cnblogs.com/qiudaozhang/p/17278678.html