Clickhouse MergeTree was created with CRUD

  1. Create table
create table mt_table
(date Date,id UInt8,name String) 
engine = MergeTree 
partition by toYYYYMM(date) 
order by id;

Insert picture description here

  1. Insert data
insert into mt_table values ('2019-05-01', 1, 'zhangsan');
insert into mt_table values ('2019-06-01', 2, 'lisi');
insert into mt_table values ('2019-05-03', 3, 'wangwu');
  1. Update operation
alter table mt_table update name='bailishouyue' where id =1;

Insert picture description here

  1. Delete operation
alter table mt_table delete where id = 

Insert picture description here

  1. Query operation
select * from mt_table;

It can be found that the update and delete operations have taken effect
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_38813363/article/details/113863369