- Create table
create table mt_table
(date Date,id UInt8,name String)
engine = MergeTree
partition by toYYYYMM(date)
order by id;
- 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');
- Update operation
alter table mt_table update name='bailishouyue' where id =1;
- Delete operation
alter table mt_table delete where id =
- Query operation
select * from mt_table;
It can be found that the update and delete operations have taken effect